{"_id":"dlv","_rev":"331577","name":"dlv","description":"Safely get a dot-notated property within an object.","dist-tags":{"latest":"1.1.3"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"time":{"modified":"2021-06-07T02:47:06.000Z","created":"2016-08-04T00:23:15.527Z","1.1.3":"2019-05-22T13:14:06.959Z","1.1.2":"2018-06-06T20:11:10.799Z","1.1.1":"2018-01-14T00:21:24.083Z","1.1.0":"2017-01-31T19:46:27.370Z","1.0.2":"2016-08-04T03:06:27.142Z","1.0.1":"2016-08-04T00:53:37.724Z","1.0.0":"2016-08-04T00:23:15.527Z"},"users":{"developit":true,"petershev":true,"evocateur":true},"author":{"name":"Jason Miller","email":"jason@developit.ca","url":"http://jasonformat.com"},"repository":{"type":"git","url":"git+https://github.com/developit/dlv.git"},"versions":{"1.1.3":{"name":"dlv","version":"1.1.3","description":"Safely get a dot-notated property within an object.","main":"dist/dlv.js","browser":"dist/dlv.umd.js","module":"dist/dlv.es.js","scripts":{"dev":"microbundle watch","build":"microbundle","prepublish":"npm run build","test":"node test","release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["delve","dot notation","dot"],"author":{"name":"Jason Miller","email":"jason@developit.ca","url":"http://jasonformat.com"},"repository":{"type":"git","url":"git+https://github.com/developit/dlv.git"},"license":"MIT","devDependencies":{"microbundle":"^0.11.0"},"gitHead":"e636db817a96e4ca4710b407163fb992748b3b80","bugs":{"url":"https://github.com/developit/dlv/issues"},"homepage":"https://github.com/developit/dlv#readme","_id":"dlv@1.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"5c198a8a11453596e751494d49874bc7732f2e79","size":2160,"noattachment":false,"key":"/dlv/-/dlv-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.1.3.tgz"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dlv_1.1.3_1558530846846_0.17059745612482824"},"_hasShrinkwrap":false,"publish_time":1558530846959,"_cnpm_publish_time":1558530846959},"1.1.2":{"name":"dlv","version":"1.1.2","description":"Safely get a dot-notated property within an object.","main":"dist/dlv.js","browser":"dist/dlv.umd.js","module":"dist/dlv.es.js","scripts":{"dev":"microbundle watch","build":"microbundle","prepublish":"npm run build","test":"node test","release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["delve","dot notation","dot"],"files":["index.js","dist"],"author":{"name":"Jason Miller","email":"jason@developit.ca","url":"http://jasonformat.com"},"repository":{"type":"git","url":"git+https://github.com/developit/dlv.git"},"license":"MIT","devDependencies":{"microbundle":"^0.4.1"},"gitHead":"66258e3ba1f9d1b52277dd902e8e90c625e4b354","bugs":{"url":"https://github.com/developit/dlv/issues"},"homepage":"https://github.com/developit/dlv#readme","_id":"dlv@1.1.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"270f6737b30d25b6657a7e962c784403f85137e5","size":2158,"noattachment":false,"key":"/dlv/-/dlv-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.1.2.tgz"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dlv_1.1.2_1528315870656_0.8448732983003138"},"_hasShrinkwrap":false,"publish_time":1528315870799,"_cnpm_publish_time":1528315870799},"1.1.1":{"name":"dlv","version":"1.1.1","description":"Safely get a dot-notated property within an object.","main":"dist/dlv.js","browser":"dist/dlv.umd.js","module":"dist/dlv.es.js","scripts":{"dev":"microbundle watch","build":"microbundle","prepublish":"npm run build","test":"node test","release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["delve","dot notation","dot"],"files":["index.js","dist"],"author":{"name":"Jason Miller","email":"jason@developit.ca","url":"http://jasonformat.com"},"repository":{"type":"git","url":"git+https://github.com/developit/dlv.git"},"license":"MIT","devDependencies":{"microbundle":"^0.3.0"},"gitHead":"35bc1591cfa7921b598413f6778a2b4bee0f5031","bugs":{"url":"https://github.com/developit/dlv/issues"},"homepage":"https://github.com/developit/dlv#readme","_id":"dlv@1.1.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.2","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"c79d96bfe659a5568001250ed2aaf653992bdd3f","size":1954,"noattachment":false,"key":"/dlv/-/dlv-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.1.1.tgz"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dlv-1.1.1.tgz_1515889284011_0.6087712778244168"},"directories":{},"publish_time":1515889284083,"_hasShrinkwrap":false,"_cnpm_publish_time":1515889284083},"1.1.0":{"name":"dlv","version":"1.1.0","description":"Safely get a dot-notated property within an object.","main":"dist/dlv.js","browser":"dist/dlv.umd.js","jsnext:main":"index.js","scripts":{"build":"mkdir -p dist && npm run -s build:cjs && npm run -s build:umd","build:cjs":"rollup -i $npm_package_jsnext_main -f cjs --no-strict | uglifyjs -cm -o $npm_package_main","build:umd":"rollup -i $npm_package_jsnext_main -n $npm_package_name -f umd --no-strict | uglifyjs -cm -o $npm_package_browser","prepublish":"npm run build","test":"node test","release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["delve","dot notation","dot"],"files":["index.js","dist"],"author":{"name":"Jason Miller","email":"jason@developit.ca","url":"http://jasonformat.com"},"repository":{"type":"git","url":"git+https://github.com/developit/dlv.git"},"license":"MIT","devDependencies":{"rollup":"^0.34.3","uglifyjs":"^2.4.10"},"gitHead":"465f3b5c57c72a924c235ead52635262fb009fc2","bugs":{"url":"https://github.com/developit/dlv/issues"},"homepage":"https://github.com/developit/dlv#readme","_id":"dlv@1.1.0","_shasum":"fee1a7c43f63be75f3f679e85262da5f102764a7","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"developit","email":"jason@developit.ca"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"dist":{"shasum":"fee1a7c43f63be75f3f679e85262da5f102764a7","size":2465,"noattachment":false,"key":"/dlv/-/dlv-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dlv-1.1.0.tgz_1485891985481_0.9088218901306391"},"directories":{},"publish_time":1485891987370,"_cnpm_publish_time":1485891987370,"_hasShrinkwrap":false},"1.0.2":{"name":"dlv","version":"1.0.2","description":"Safely get a dot-notated property within an object.","main":"dist/dlv.js","browser":"dist/dlv.umd.js","jsnext:main":"index.js","scripts":{"build":"mkdir -p dist && npm run -s build:cjs && npm run -s build:umd","build:cjs":"rollup -i $npm_package_jsnext_main -f cjs --no-strict | uglifyjs -cm -o $npm_package_main","build:umd":"rollup -i $npm_package_jsnext_main -n $npm_package_name -f umd --no-strict | uglifyjs -cm -o $npm_package_browser","prepublish":"npm run build","test":"node test","release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["delve","dot notation","dot"],"files":["index.js","dist"],"author":{"name":"Jason Miller","email":"jason@developit.ca","url":"http://jasonformat.com"},"repository":{"type":"git","url":"git+https://github.com/developit/dlv.git"},"license":"MIT","devDependencies":{"rollup":"^0.34.3","uglifyjs":"^2.4.10"},"gitHead":"886103562e4466f31f0d491cd8932720542d98d9","bugs":{"url":"https://github.com/developit/dlv/issues"},"homepage":"https://github.com/developit/dlv#readme","_id":"dlv@1.0.2","_shasum":"83c9209ced992af8489b688ac8aa207f2530cd1a","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"developit","email":"jason@developit.ca"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"dist":{"shasum":"83c9209ced992af8489b688ac8aa207f2530cd1a","size":2165,"noattachment":false,"key":"/dlv/-/dlv-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dlv-1.0.2.tgz_1470279985686_0.9652429856359959"},"directories":{},"publish_time":1470279987142,"_cnpm_publish_time":1470279987142,"_hasShrinkwrap":false},"1.0.1":{"name":"dlv","version":"1.0.1","description":"Safely get a dot-notated property within an object.","main":"dist.js","jsnext:main":"index.js","scripts":{"build":"rollup -f cjs --no-strict $npm_package_jsnext_main | uglifyjs -cm -o $npm_package_main","prepublish":"npm run build","test":"node test","release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["delve","dot notation","dot"],"files":["index.js","dist.js"],"author":{"name":"Jason Miller","email":"jason@developit.ca"},"license":"MIT","devDependencies":{"rollup":"^0.34.3","uglifyjs":"^2.4.10"},"gitHead":"6bd5bd5726800d3776c5a9257e9238346ad79241","_id":"dlv@1.0.1","_shasum":"26a0f66162d4526c859ed45c883534225b5e0435","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"developit","email":"jason@developit.ca"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"dist":{"shasum":"26a0f66162d4526c859ed45c883534225b5e0435","size":1800,"noattachment":false,"key":"/dlv/-/dlv-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/dlv-1.0.1.tgz_1470272016367_0.02268392569385469"},"directories":{},"publish_time":1470272017724,"_cnpm_publish_time":1470272017724,"_hasShrinkwrap":false},"1.0.0":{"name":"dlv","version":"1.0.0","description":"Safely get a dot-notated property within an object.","main":"index.js","scripts":{"test":"node test"},"keywords":["delve","dot notation","dot"],"files":["index.js"],"author":{"name":"Jason Miller","email":"jason@developit.ca"},"license":"MIT","gitHead":"f98e516343303da1147c8674367f00c1cae58fa3","_id":"dlv@1.0.0","_shasum":"3f27ce3ce4aa6fa647dbe8508a3c2d8125e96d0b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"developit","email":"jason@developit.ca"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"dist":{"shasum":"3f27ce3ce4aa6fa647dbe8508a3c2d8125e96d0b","size":864,"noattachment":false,"key":"/dlv/-/dlv-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dlv/download/dlv-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dlv-1.0.0.tgz_1470270193989_0.7065422770101577"},"directories":{},"publish_time":1470270195527,"_cnpm_publish_time":1470270195527,"_hasShrinkwrap":false}},"readme":"# `dlv(obj, keypath)` [![NPM](https://img.shields.io/npm/v/dlv.svg)](https://npmjs.com/package/dlv) [![Build](https://travis-ci.org/developit/dlv.svg?branch=master)](https://travis-ci.org/developit/dlv)\n\n> Safely get a dot-notated path within a nested object, with ability to return a default if the full key path does not exist or the value is undefined\n\n\n### Why?\n\nSmallest possible implementation: only **130 bytes.**\n\nYou could write this yourself, but then you'd have to write [tests].\n\nSupports ES Modules, CommonJS and globals.\n\n\n### Installation\n\n`npm install --save dlv`\n\n\n### Usage\n\n`delve(object, keypath, [default])`\n\n```js\nimport delve from 'dlv';\n\nlet obj = {\n\ta: {\n\t\tb: {\n\t\t\tc: 1,\n\t\t\td: undefined,\n\t\t\te: null\n\t\t}\n\t}\n};\n\n//use string dot notation for keys\ndelve(obj, 'a.b.c') === 1;\n\n//or use an array key\ndelve(obj, ['a', 'b', 'c']) === 1;\n\ndelve(obj, 'a.b') === obj.a.b;\n\n//returns undefined if the full key path does not exist and no default is specified\ndelve(obj, 'a.b.f') === undefined;\n\n//optional third parameter for default if the full key in path is missing\ndelve(obj, 'a.b.f', 'foo') === 'foo';\n\n//or if the key exists but the value is undefined\ndelve(obj, 'a.b.d', 'foo') === 'foo';\n\n//Non-truthy defined values are still returned if they exist at the full keypath\ndelve(obj, 'a.b.e', 'foo') === null;\n\n//undefined obj or key returns undefined, unless a default is supplied\ndelve(undefined, 'a.b.c') === undefined;\ndelve(undefined, 'a.b.c', 'foo') === 'foo';\ndelve(obj, undefined, 'foo') === 'foo';\n```\n\n\n### Setter Counterparts\n\n- [dset](https://github.com/lukeed/dset) by [@lukeed](https://github.com/lukeed) is the spiritual \"set\" counterpart of `dlv` and very fast.\n- [bury](https://github.com/kalmbach/bury) by [@kalmbach](https://github.com/kalmbach) does the opposite of `dlv` and is implemented in a very similar manner.\n\n\n### License\n\n[MIT](https://oss.ninja/mit/developit/)\n\n\n[preact]: https://github.com/developit/preact\n[tests]: https://github.com/developit/dlv/blob/master/test.js\n","_attachments":{},"homepage":"https://github.com/developit/dlv#readme","bugs":{"url":"https://github.com/developit/dlv/issues"},"license":"MIT"}