{"_id":"get-first","_rev":"106555","name":"get-first","description":"Pass an array of object paths (e.g. `a.b.c`) and get the first non-undefined value if the property exists, or null if it does not.","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:38:37.000Z","created":"2014-11-04T15:44:27.688Z","0.1.2":"2016-01-18T18:15:01.923Z","0.1.1":"2014-11-05T05:10:43.419Z","0.1.0":"2014-11-04T15:44:27.688Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/get-first.git"},"versions":{"0.1.2":{"name":"get-first","description":"Pass an array of object paths (e.g. `a.b.c`) and get the first non-undefined value if the property exists, or null if it does not.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/get-first","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/get-first.git"},"bugs":{"url":"https://github.com/jonschlinkert/get-first/issues"},"license":"MIT","main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"keywords":["get","key","array","nested","object","path","paths","prop","first","properties","property","props","segment","util","utilities","utility","utils","value","values"],"dependencies":{"get-value":"^2.0.2"},"devDependencies":{"should":"^8.1.1"},"gitHead":"b3a4ee3bd0b981ab3b366564fef83b9f65d7f500","_id":"get-first@0.1.2","_shasum":"3bc3ce77d7ab9cd1ae8f904c38c3f22402e95794","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"3bc3ce77d7ab9cd1ae8f904c38c3f22402e95794","size":3052,"noattachment":false,"key":"/get-first/-/get-first-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-first/download/get-first-0.1.2.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1453140901923,"_cnpm_publish_time":1453140901923,"_hasShrinkwrap":false},"0.1.1":{"name":"get-first","description":"Pass an array of object paths (e.g. `a.b.c`) and get the first non-undefined value if the property exists, or null if it does not.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/get-first","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/get-first.git"},"bugs":{"url":"https://github.com/jonschlinkert/get-first/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/get-first/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.1.0","verb":">= 0.2.6"},"keywords":["get","key","array","nested","object","path","paths","prop","first","properties","property","props","segment","util","utilities","utility","utils","value","values"],"dependencies":{"get-value":"^0.3.2","isobject":"^0.2.0"},"_id":"get-first@0.1.1","_shasum":"6cd4454610c85327b7b2d6f45b98e2385ea7b012","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6cd4454610c85327b7b2d6f45b98e2385ea7b012","size":3099,"noattachment":false,"key":"/get-first/-/get-first-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-first/download/get-first-0.1.1.tgz"},"directories":{},"publish_time":1415164243419,"_cnpm_publish_time":1415164243419,"_hasShrinkwrap":false},"0.1.0":{"name":"get-first","description":"Pass an array of object paths (e.g. `a.b.c`) and get the first non-undefined value if the property exists, or null if it does not.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/get-first","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/get-first.git"},"bugs":{"url":"https://github.com/jonschlinkert/get-first/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/get-first/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.1.0","verb":">= 0.2.6"},"keywords":["get","key","array","nested","object","path","paths","prop","first","properties","property","props","segment","util","utilities","utility","utils","value","values"],"dependencies":{"get-value":"^0.3.2","isobject":"^0.2.0"},"_id":"get-first@0.1.0","_shasum":"922f328b9a1f9822226ac19642b22fb13b6c2eb3","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"922f328b9a1f9822226ac19642b22fb13b6c2eb3","size":3089,"noattachment":false,"key":"/get-first/-/get-first-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-first/download/get-first-0.1.0.tgz"},"directories":{},"publish_time":1415115867688,"_cnpm_publish_time":1415115867688,"_hasShrinkwrap":false}},"readme":"# get-first [![NPM version](https://img.shields.io/npm/v/get-first.svg)](https://www.npmjs.com/package/get-first)\n\n> Pass an array of object paths (e.g. `a.b.c`) and get the first non-undefined value if the property exists, or null if it does not.\n\n## Install\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm i get-first\n```\n\n## Run tests\n\n```bash\nnpm test\n```\n\n## Usage\n\n```js\nvar getFirst = require('get-first');\n\ngetFirst({a: 'b'}, 'a');\n//=> 'b'\n\ngetFirst({a: 'b'}, ['a']);\n//=> 'b'\n\ngetFirst({a: {b: 'c'}}, 'a.b');\n//=> 'c'\n\ngetFirst({a: {b: 'c'}}, ['a.b']);\n//=> 'c'\n\ngetFirst({a: {b: 'c'}, x: {b: 'd'}}, ['a.b', 'x.b']);\n//=> 'c'\n\ngetFirst({a: {b: 'c'}, x: {b: 'd'}}, ['x.b', 'a.b']);\n//=> 'd'\n\ngetFirst({a: {b: {c: 'd'}}}, ['a.b', 'x.y.z']);\n//=> {c: 'd'}\n\ngetFirst({a: {b: {c: 'd'}, e: 'f'}}, ['a.c', 'a.e']);\n//=> 'f'\n```\n\n## Related\n\n\n## Running tests\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/get-first/issues/new).\n\n## Author\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb) on January 18, 2016._\n","_attachments":{},"homepage":"https://github.com/jonschlinkert/get-first","bugs":{"url":"https://github.com/jonschlinkert/get-first/issues"},"license":"MIT"}