{"_id":"reach","_rev":"128-706d3b35c3af4636a9e2adc641a5733f","name":"reach","time":{"modified":"2022-06-25T15:32:20.516Z","created":"2013-12-02T21:48:45.144Z","0.0.22-alpha":"2013-12-02T21:48:49.081Z","0.0.23-alpha":"2013-12-02T22:55:56.475Z","0.0.24-alpha":"2013-12-02T23:02:08.832Z","0.0.25-alpha":"2013-12-03T11:22:29.691Z","0.0.26-alpha":"2013-12-04T22:06:08.870Z","0.0.27-alpha":"2013-12-06T06:30:00.224Z","0.0.1":"2014-11-15T16:00:18.841Z","0.0.2":"2014-11-15T16:05:46.676Z","0.0.3":"2014-11-15T16:22:53.531Z","0.0.4":"2014-11-15T18:28:20.585Z","0.0.5":"2014-11-15T18:31:05.656Z","0.0.6":"2014-11-16T12:55:19.457Z","0.1.1":"2014-11-16T12:57:22.774Z","0.1.2":"2014-11-16T13:36:48.383Z","0.1.3":"2014-11-16T14:30:49.445Z","0.1.4":"2014-11-16T14:35:46.630Z","0.1.5":"2014-11-16T14:50:21.181Z","0.1.6":"2014-11-16T21:42:02.570Z","0.1.7":"2014-11-17T00:23:40.082Z","0.1.8":"2014-11-17T01:28:54.882Z","0.1.9":"2014-11-24T19:51:57.976Z","0.1.10":"2014-11-24T21:18:45.388Z","0.1.11":"2014-11-26T12:11:18.128Z","0.3.8":"2014-12-07T19:19:30.735Z","0.3.9":"2014-12-07T20:28:24.350Z","0.3.10":"2014-12-07T22:53:44.365Z","0.3.11":"2014-12-08T11:11:09.102Z","0.3.12":"2014-12-08T11:35:22.827Z","0.3.13":"2014-12-08T12:07:17.882Z","0.3.14":"2014-12-12T13:10:02.012Z","0.3.15":"2014-12-12T20:27:24.473Z","0.3.16":"2014-12-18T18:18:02.483Z","0.3.17":"2015-01-02T09:13:19.703Z","0.3.18":"2015-01-14T15:27:13.484Z","0.3.19":"2015-01-22T06:43:47.552Z","0.3.20":"2015-01-22T11:53:32.380Z","0.3.21":"2015-01-24T17:04:32.610Z","0.3.22":"2015-01-25T11:23:08.016Z","0.3.23":"2015-01-28T19:15:30.652Z","0.3.25":"2015-02-01T18:35:05.627Z","0.3.26":"2015-02-01T19:15:15.842Z","0.3.27":"2015-02-01T19:30:42.363Z","0.3.28":"2015-02-01T20:10:27.714Z","0.3.29":"2015-02-01T20:28:43.114Z","0.3.30":"2015-02-02T20:08:13.630Z","0.4.0":"2015-02-22T00:10:48.138Z","0.4.1":"2015-02-22T16:53:31.066Z","0.4.2":"2015-02-22T17:17:55.148Z","0.1.0":"2015-07-19T08:09:54.198Z","0.2.0":"2015-07-19T10:27:37.679Z","0.2.1":"2015-07-19T12:12:55.579Z","0.2.2":"2015-07-19T12:30:48.640Z","0.2.3":"2015-07-20T01:23:28.835Z","0.2.4":"2015-07-20T04:29:58.383Z","0.2.5":"2015-07-20T05:02:23.711Z","0.2.6":"2015-07-20T07:14:21.967Z","0.3.0":"2015-08-08T16:26:46.308Z","0.3.1":"2015-08-09T06:05:52.606Z","0.3.2":"2015-08-10T05:53:15.225Z","0.3.3":"2015-08-12T11:51:30.261Z","0.3.4":"2015-08-13T18:11:06.869Z","0.3.5":"2015-08-13T18:28:57.779Z","0.3.6":"2015-08-17T06:12:35.907Z","0.3.7":"2015-09-08T16:36:15.558Z","0.5.0":"2015-10-09T21:04:24.479Z","1.0.0":"2015-12-05T02:16:59.658Z","0.9.0":"2018-04-10T00:02:35.594Z","1.0.1":"2018-04-10T02:38:02.237Z"},"maintainers":[{"name":"cjihrig","email":"cjihrig@gmail.com"}],"dist-tags":{"latest":"1.0.1"},"description":"safely retrieve nested object keys","readme":"# reach\n\n[![Current Version](https://img.shields.io/npm/v/reach.svg)](https://www.npmjs.org/package/reach)\n[![Build Status via Travis CI](https://travis-ci.org/cjihrig/reach.svg?branch=master)](https://travis-ci.org/cjihrig/reach)\n![Dependencies](http://img.shields.io/david/cjihrig/reach.svg)\n[![belly-button-style](https://cdn.rawgit.com/cjihrig/belly-button/master/badge.svg)](https://github.com/cjihrig/belly-button)\n\nSafely retrieve nested object keys. Inspired by the [Hoek](https://github.com/hapijs/hoek) module's `reach()` method.\n\n```javascript\nconst Reach = require('reach');\nconst obj = {\n  foo: {\n    bar: {\n      baz: 3\n    }\n  }\n};\n\nReach(obj, 'foo.bar.baz');\n// Returns 3\n```\n\n## Methods\n\n`Reach` exports a single function, described below.\n\n### `reach(obj, chain [, options])`\n\n  - Arguments\n    - `obj` (object) - An object to retrieve a value from.\n    - `chain` (string) - A string specifying the path to traverse within `obj`. Path segments are delimited by periods (`'.'`) by default. If a non-string is provided, a `TypeError` is thrown.\n    - `options` (object) - A configuration object supporting the following keys.\n      - `separator` (string) - Path segment delimiter. Defaults to `'.'`.\n      - `strict` (boolean) - If `true`, an error is thrown when the complete `chain` cannot be found in `obj`. Defaults to `false`.\n      - `default` - The value returned if the complete `chain` cannot be found in `obj`, and `strict` is `false`. Defaults to `undefined`.\n  - Returns\n    - The value found by traversing `chain` through `obj`. If no value is found, and the `strict` option is `false` (default behavior), then `default` is returned.\n\nTraverses an object, `obj`. The path through the object is dictated by the `chain` string.\n","versions":{"1.0.0":{"name":"reach","version":"1.0.0","description":"safely retrieve nested object keys","author":{"name":"Continuation Labs","email":"contact@continuation.io","url":"http://continuation.io/"},"main":"lib/index.js","homepage":"https://github.com/continuationlabs/reach","repository":{"type":"git","url":"https://github.com/continuationlabs/reach"},"bugs":{"url":"https://github.com/continuationlabs/reach/issues"},"license":"MIT","scripts":{"test":"belly-button && lab -v -t 100 -a code"},"engines":{"node":">=4.0.0"},"devDependencies":{"belly-button":"1.x.x","code":"2.x.x","lab":"8.x.x"},"keywords":["object","path","nested","reach","nested object","safe lookup","object path"],"gitHead":"0f22c64d4669a4a87234a473ce73846e0f9e711e","_id":"reach@1.0.0","_shasum":"4d12d160960bcac67dc624f0f91bafeb36f794f6","_from":".","_npmVersion":"3.3.12","_nodeVersion":"6.0.0-pre","_npmUser":{"name":"cjihrig","email":"cjihrig@gmail.com"},"dist":{"shasum":"4d12d160960bcac67dc624f0f91bafeb36f794f6","tarball":"https://registry.npmjs.org/reach/-/reach-1.0.0.tgz","integrity":"sha512-5lc5f2Qt+pPsksiNntcdMh4nqNYK2SQhnCyErOBbBQh3bvjbCkxRTysETGDf8yUXnzOfjTlNOA8we9MXqQTYHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFN7IgrCX4VFcniE0GKSue8MyZY687ZxYNrD/8Kpdk27AiEAnY1aBJFdqPOKCdo/7SioqDuQ1KhyhUYKsckDhuIcCiA="}]},"maintainers":[{"name":"cjihrig","email":"cjihrig@gmail.com"}],"directories":{}},"0.9.0":{"name":"reach","version":"0.9.0","description":"safely retrieve nested object keys","author":{"name":"Colin Ihrig","email":"cjihrig@gmail.com","url":"https://cjihrig.com/"},"main":"lib/index.js","homepage":"https://github.com/cjihrig/reach","repository":{"type":"git","url":"git+https://github.com/cjihrig/reach.git"},"bugs":{"url":"https://github.com/cjihrig/reach/issues"},"license":"MIT","scripts":{"test":"belly-button && lab -v -t 100 -a code"},"devDependencies":{"belly-button":"4.x.x","code":"5.x.x","lab":"14.x.x"},"keywords":["object","path","nested","reach","nested object","safe lookup","object path"],"gitHead":"716820577c4b447cf31b17e7eb1b96550aa69a96","_id":"reach@0.9.0","_shasum":"fd38b205ad7aaa961828bde17a5f0cb027950d3b","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.10.48","_npmUser":{"name":"cjihrig","email":"cjihrig@gmail.com"},"dist":{"shasum":"fd38b205ad7aaa961828bde17a5f0cb027950d3b","tarball":"https://registry.npmjs.org/reach/-/reach-0.9.0.tgz","fileCount":7,"unpackedSize":8104,"integrity":"sha512-pCt574ZJqj83W9sNDGR5UKXRJv/zBU3zH+6vXjlgi81K6RRF87fPwXCusFKySHrTdrAQ0xMNAXD/KfU0b91SFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGB53gRSY3FVZIoo35wgPkas1EKCxXwpYH7+H6Vvy9VhAiEAnqtqMfCoMHdEWPSFwpVTCju1wu4py4wCVrGlkGQat2Q="}]},"maintainers":[{"name":"cjihrig","email":"cjihrig@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reach_0.9.0_1523318555528_0.03898544910583923"},"_hasShrinkwrap":false},"1.0.1":{"name":"reach","version":"1.0.1","description":"safely retrieve nested object keys","author":{"name":"Colin Ihrig","email":"cjihrig@gmail.com","url":"https://cjihrig.com/"},"main":"lib/index.js","homepage":"https://github.com/cjihrig/reach","repository":{"type":"git","url":"git+https://github.com/cjihrig/reach.git"},"bugs":{"url":"https://github.com/cjihrig/reach/issues"},"license":"MIT","scripts":{"test":"belly-button && lab -v -t 100 -a code"},"engines":{"node":">=4.0.0"},"devDependencies":{"belly-button":"4.x.x","code":"5.x.x","lab":"14.x.x"},"keywords":["object","path","nested","reach","nested object","safe lookup","object path"],"gitHead":"d524ad63fc337d8ba6447db8f65500a256eefeed","_id":"reach@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"cjihrig","email":"cjihrig@gmail.com"},"dist":{"integrity":"sha512-TyINp42lj7idWA7/twiZhpokruUPpj6YS1HJ0hDt8L+9upXtK0knjlC2bZigQyg2/okcHJl35Ngxw6ydougFjg==","shasum":"4dba62888d78a09b48b74123ef5336c42624f2ad","tarball":"https://registry.npmjs.org/reach/-/reach-1.0.1.tgz","fileCount":6,"unpackedSize":7538,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjHD6+CWVFbKzSX7a6NIZUOQG7DyKHeBYfg288+JEl6QIhALCVr72w+xi6HpcSRQIRHwQ7YvaiZZmzmHhzYU7pTzCy"}]},"maintainers":[{"name":"cjihrig","email":"cjihrig@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reach_1.0.1_1523327882187_0.3024732440709137"},"_hasShrinkwrap":false}},"homepage":"https://github.com/cjihrig/reach","keywords":["object","path","nested","reach","nested object","safe lookup","object path"],"repository":{"type":"git","url":"git+https://github.com/cjihrig/reach.git"},"author":{"name":"Colin Ihrig","email":"cjihrig@gmail.com","url":"https://cjihrig.com/"},"bugs":{"url":"https://github.com/cjihrig/reach/issues"},"license":"MIT","readmeFilename":"README.md"}