{"_id":"coalescy","_rev":"161074","name":"coalescy","description":"Simple function that return the first non null or undefined argument ","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"royriojas","email":"royriojas@gmail.com"}],"time":{"modified":"2021-06-03T11:40:16.000Z","created":"2015-03-09T07:48:33.398Z","1.0.0":"2015-03-09T07:48:33.398Z"},"users":{"chocolateboy":true},"author":{"name":"Roy Riojas"},"repository":{"type":"git","url":"https://github.com/royriojas/coalescy.git"},"versions":{"1.0.0":{"name":"coalescy","version":"1.0.0","description":"Simple function that return the first non null or undefined argument ","main":"index.js","scripts":{"test":"mocha-runner './specs/**/*.js'","lint":"eslint --format 'node_modules/eslint-friendly-formatter' lib/ bin/ specs/ -c './configs/eslint.json'","coverage":"istanbul cover -x 'specs/**/*.js' mocha-runner 'specs/**/*.js' html text-summary","coverage-cache":"istanbul cover -x 'specs/**/*.js' mocha-runner 'specs/**/*.js' html text-summary -- --useCache=true","watch":"npm run coverage && watch-spawn -p 'specs/**/*.js' -p 'bin/**/*.js' -p 'lib/**/*.js' npm run coverage-cache"},"repository":{"type":"git","url":"https://github.com/royriojas/coalescy.git"},"keywords":["coalesce","first","not","null","first","not","undefined","utility"],"author":{"name":"Roy Riojas"},"license":"MIT","bugs":{"url":"https://github.com/royriojas/coalescy/issues"},"homepage":"https://github.com/royriojas/coalescy","devDependencies":{"eslint":"^0.16.1","eslint-friendly-formatter":"^1.0.3","istanbul":"^0.3.7","mocha-runner":"^1.0.0","watch-spawn":"^1.0.2"},"gitHead":"6faf781b48a0be7107ad9e63721d6fc1f7924018","_id":"coalescy@1.0.0","_shasum":"4b065846b836361ada6c4b4a4abf4bc1cac31bf1","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.12.0","_npmUser":{"name":"royriojas","email":"royriojas@gmail.com"},"maintainers":[{"name":"royriojas","email":"royriojas@gmail.com"}],"dist":{"shasum":"4b065846b836361ada6c4b4a4abf4bc1cac31bf1","size":6984,"noattachment":false,"key":"/coalescy/-/coalescy-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/coalescy/download/coalescy-1.0.0.tgz"},"directories":{},"publish_time":1425887313398,"_cnpm_publish_time":1425887313398,"_hasShrinkwrap":false}},"readme":"[![NPM Version](http://img.shields.io/npm/v/coalescy.svg?style=flat)](https://npmjs.org/package/coalescy)\n[![Build Status](http://img.shields.io/travis/royriojas/coalescy.svg?style=flat)](https://travis-ci.org/royriojas/coalescy)\n\n# coalescy\n> Simple function that return the first non null or undefined argument passed to it\n\n## Install\n\n```bash\nnpm i --save coalescy\n```\n\n## Usage\n\n`coalescy` simply return the first non nully of the passed elements. Null if all the values are null\n\nit works the same as\n\n```javascript\na || b\n```\n\nbut it works on falsie values too\n\n## Example\n\n```javascript \nvar clsc = require('coalescy');\nvar obj = clsc(null, []); // obj = [];\nobj = clsc(null, {}); // obj = {};\nobj = clsc(null, [], {}); // obj = []; // the first non null\nobj = clsc(null, undefined, 0, []) // 0\n```","_attachments":{},"homepage":"https://github.com/royriojas/coalescy","bugs":{"url":"https://github.com/royriojas/coalescy/issues"},"license":"MIT"}