{"name":"own-or-env","version":"1.0.1","description":"Use an objects own property, or an environment variable.  Optionally treat as a boolean if the env should be set to 1 or 0.","main":"own-or-env.js","scripts":{"test":"tap test.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/own-or-env.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","bugs":{"url":"https://github.com/isaacs/own-or-env/issues"},"homepage":"https://github.com/isaacs/own-or-env#readme","dependencies":{"own-or":"^1.0.0"},"devDependencies":{"tap":"^11.1.0"},"gitHead":"31d69cd54ae14e5d605696bc58a77091d78b37ac","_id":"own-or-env@1.0.1","_npmVersion":"5.6.0-canary.11","_nodeVersion":"8.9.1","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"integrity":"sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==","shasum":"54ce601d3bf78236c5c65633aa1c8ec03f8007e4","tarball":"http://registry-npm.ywwl.com/own-or-env/download/own-or-env-1.0.1.tgz","fileCount":8,"unpackedSize":4908,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+RNHWyUnTdNohlzCkj/+wLnxTzZc0DFOwFIh41/rAiQIhAIzR8z9k7yeMuys+bbZLr+nJ8MBwHbg2jmsqg3lba1yc"}],"size":2440,"noattachment":false,"key":"/own-or-env/-/own-or-env-1.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/own-or-env_1.0.1_1518458023062_0.3464231901305035"},"_hasShrinkwrap":false,"readme":"# own-or-env\n\nUse an objects own property, or an environment variable.  Optionally\ntreat as a boolean if the env should be set to 1 or 0.\n\n## API\n\n`ownOrEnv(object, field, env, boolean)`\n\nUse the `object[field]` if it's an own property, otherwise use the\nnamed environent variable.  If `boolean` is set to `true`, then cast\nto a boolean flag.\n\n## USAGE\n\n```js\n// will set doTheThing to true based on config.doThing, falling back\n// to reading process.env.DO_THING, where '0' is treated as false.\nvar doTheThing = ownOrEnv(config, 'doThing', 'DO_THING', true)\n\n// just treat this one as a string, not a boolean flag\nvar file = ownOrEnv(config, 'file', 'MY_FILE')\n```\n","publish_time":1518458023108,"_cnpm_publish_time":1518458023108,"dist-tags":{"latest":"1.0.2"}}