{"_id":"object-resolve-path","_rev":"5-3c2127db0f30a0ee4cc156962c08f03a","name":"object-resolve-path","description":"a simple utility function for getting a value at a path from an object with all the usecases properly covered","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"object-resolve-path","version":"1.0.0","description":"a simple utility function for getting a value at a path from an object with all the usecases properly covered","main":"object-resolve-path.js","scripts":{"test":"mocha"},"keywords":["object","property","accessor","string"],"devDependencies":{"chai":"^3.0.0","mocha":"^2.2.5"},"repository":{"type":"git","url":"git+https://github.com/capaj/object-resolve-path.git"},"author":{"name":"capajj@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/capaj/object-resolve-path/issues"},"homepage":"https://github.com/capaj/object-resolve-path#readme","gitHead":"494d4180d342a4ecc324aa71a33843fa3946ab76","_id":"object-resolve-path@1.0.0","_shasum":"f1d2e1befa33d0830b0722f876a9752552725f1b","_from":".","_npmVersion":"2.13.0","_nodeVersion":"2.4.0","_npmUser":{"name":"capaj","email":"capajj@gmail.com"},"maintainers":[{"name":"capaj","email":"capajj@gmail.com"}],"dist":{"shasum":"f1d2e1befa33d0830b0722f876a9752552725f1b","tarball":"https://registry.npmjs.org/object-resolve-path/-/object-resolve-path-1.0.0.tgz","integrity":"sha512-hPYaZoJv1w76TN/3/9FEyw8VLiBp5P7r/cn3fKPF5sE1CRlGAfXd7oIIOYxQ90P8Q4j2iHZb1N1DIslIRp03SQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1S4s+8vTjplGNq8NYKJvQX66IJxgnpK/3Dem53NKNFAiAXmHBMFWkzc5G8OYPkZgeLt2rOG2QedXDPNLOzyASwug=="}]}},"1.1.0":{"name":"object-resolve-path","version":"1.1.0","description":"a simple utility function for getting a value at a path from an object with all the usecases properly covered","main":"object-resolve-path.js","scripts":{"test":"mocha"},"keywords":["object","property","accessor","string"],"devDependencies":{"chai":"^3.0.0","mocha":"^2.2.5"},"repository":{"type":"git","url":"git+https://github.com/capaj/object-resolve-path.git"},"author":{"name":"capajj@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/capaj/object-resolve-path/issues"},"homepage":"https://github.com/capaj/object-resolve-path#readme","gitHead":"29d0352ebf7a5327fd9c79b68bb3c6cd66fc4d2a","_id":"object-resolve-path@1.1.0","_shasum":"109ffa79fa167cc4338f11c4b613164af40ffc4b","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"capaj","email":"capajj@gmail.com"},"maintainers":[{"name":"capaj","email":"capajj@gmail.com"}],"dist":{"shasum":"109ffa79fa167cc4338f11c4b613164af40ffc4b","tarball":"https://registry.npmjs.org/object-resolve-path/-/object-resolve-path-1.1.0.tgz","integrity":"sha512-n7bB1vbaRr+ATT/HbntOHRom4GMUY4Z+x1YjkwUF5ZexERX8AImcgdfNT9SwGcfJHbRIXiOLJoOB2gbK9JpmTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvRRgxymlpFXlKFRNKhZsPCjW+Iky1n6cpOK970hILOQIhAOx5akucMIHDvT6SWeDid+IKfUvb3N9JD5WDz5Mp8Ucd"}]}},"1.1.1":{"name":"object-resolve-path","version":"1.1.1","description":"a simple utility function for getting a value at a path from an object with all the usecases properly covered","main":"object-resolve-path.js","scripts":{"test":"mocha"},"keywords":["object","property","accessor","string"],"devDependencies":{"benchmark":"^2.1.0","chai":"^3.0.0","lodash.get":"^4.2.1","mocha":"^2.2.5"},"repository":{"type":"git","url":"git+https://github.com/capaj/object-resolve-path.git"},"author":{"name":"capajj@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/capaj/object-resolve-path/issues"},"homepage":"https://github.com/capaj/object-resolve-path#readme","gitHead":"d9a5feebdfe2eca6ffcd776786c0cdf7bb579a77","_id":"object-resolve-path@1.1.1","_shasum":"a7f8f93e8a20af80e44217ba7db54316d9d12232","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.0","_npmUser":{"name":"capaj","email":"capajj@gmail.com"},"dist":{"shasum":"a7f8f93e8a20af80e44217ba7db54316d9d12232","tarball":"https://registry.npmjs.org/object-resolve-path/-/object-resolve-path-1.1.1.tgz","integrity":"sha512-SnDr0lPbDWDB8s6qbWAcDs2dZ4G7niCJpxihaf5g6wluZQd3yHtN4ApwoKz7pLdMnRlGrdXslO57MulC+h3Neg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzFmka/9/0005oArL5s59q5wqAb/H7lgHj7sS+8WJ5xQIga0PrRef3ubCpgNkHRU5jSXgTVTXkk6ykHkvgOWNLLFI="}]},"maintainers":[{"name":"capaj","email":"capajj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/object-resolve-path-1.1.1.tgz_1460619176095_0.7775207981467247"}}},"readme":"# object-resolve-path\na simple utility function for getting a value at a path from an object with all the usecases properly covered.\nBased on Path pseodoclass from https://github.com/Polymer/observe-js/blob/7e94bb14d7c44b221af7bcc874cf9898f26747d8/src/observe.js#L305\n\n## Install\n```\nnpm i object-resolve-path\n```\n\n## Usage\n\n```javascript\nvar resolvePath = require('object-resolve-path');\nresolvePath(someObject, 'a.b[0]');\t//returns first property from b from a from someObject\nresolvePath(someObject, 'a[\"b-a\"][0]');\t//this works as well, thanks to the parser/statemachine\n```\n\n## Typical usecase?\nMost other libraries for accessing deeply nested properties of an object don't work with bracket syntax. This one does work with bracket syntax.\n\nFor thorough description, check the [tests](https://github.com/capaj/object-resolve-path/blob/master/test/object-resolve-path.spec.js).\n\n### Similar modules:\n\nhttps://www.npmjs.com/package/lodash.get (works for both but much much slower, doesn't throw when path is not valid, object-resolve-path does)\n\nhttps://github.com/deoxxa/dotty (works only for dots)\n\nhttps://github.com/Ntran013/dot-access  (works only for dots)\n\nhttps://github.com/substack/js-traverse (much more complex and useful)\n\n\n## Benchmarks\n\n```\nnode benchmark.js\nlodash.get x 2,088,580 ops/sec ±3.42% (74 runs sampled)\nobject-resolve-path x 26,260,596 ops/sec ±3.39% (85 runs sampled)\nFastest is object-resolve-path\n```\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n","maintainers":[{"name":"capaj","email":"capajj@gmail.com"}],"time":{"modified":"2022-06-22T16:57:15.912Z","created":"2015-07-30T21:50:13.223Z","1.0.0":"2015-07-30T21:50:13.223Z","1.1.0":"2015-08-04T02:00:05.833Z","1.1.1":"2016-04-14T07:32:58.861Z"},"homepage":"https://github.com/capaj/object-resolve-path#readme","keywords":["object","property","accessor","string"],"repository":{"type":"git","url":"git+https://github.com/capaj/object-resolve-path.git"},"author":{"name":"capajj@gmail.com"},"bugs":{"url":"https://github.com/capaj/object-resolve-path/issues"},"license":"MIT","readmeFilename":"README.md"}