1 |
- {"version":3,"file":"shvl.js","sources":["../index.js"],"sourcesContent":["export function get (object, path, def) {\n return (object = (path.split ? path.split('.') : path).reduce(function (obj, p) {\n return obj && obj[p]\n }, object)) === undefined ? def : object;\n};\n\nexport function set (object, path, val, obj) {\n return !/^(__proto__|constructor|prototype)$/.test(path) && ((path = path.split ? path.split('.') : path.slice(0)).slice(0, -1).reduce(function (obj, p) {\n return obj[p] = obj[p] || {};\n }, obj = object)[path.pop()] = val), object;\n};\n"],"names":["object","path","def","undefined","split","reduce","obj","p","val","test","slice","pop"],"mappings":"qBAAqBA,EAAQC,EAAMC,GACjC,YAEgBC,KAFRH,GAAUC,EAAKG,MAAQH,EAAKG,MAAM,KAAOH,GAAMI,OAAO,SAAUC,EAAKC,GAC3E,OAAOD,GAAOA,EAAIC,IACjBP,IAAyBE,EAAMF,wBAGdA,EAAQC,EAAMO,EAAKF,GACvC,OAAQ,sCAAsCG,KAAKR,MAAWA,EAAOA,EAAKG,MAAQH,EAAKG,MAAM,KAAOH,EAAKS,MAAM,IAAIA,MAAM,GAAI,GAAGL,OAAO,SAAUC,EAAKC,GACpJ,OAAOD,EAAIC,GAAKD,EAAIC,IAAM,IACnBP,GAAQC,EAAKU,OAASH,GAAMR"}
|