{"_id":"own-or-env","_rev":"850646","name":"own-or-env","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.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"isaacs","email":""}],"time":{"modified":"2021-09-13T22:10:54.000Z","created":"2017-01-19T00:04:10.288Z","1.0.2":"2021-09-13T21:57:28.173Z","1.0.1":"2018-02-12T17:53:43.108Z","1.0.0":"2017-01-19T00:04:10.288Z"},"users":{},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git+https://github.com/isaacs/own-or-env.git"},"versions":{"1.0.2":{"name":"own-or-env","version":"1.0.2","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":"fff54b8d978e4651859c90e3d84d2d9be7a5b25e","_id":"own-or-env@1.0.2","_nodeVersion":"16.5.0","_npmVersion":"7.23.0","dist":{"shasum":"84e78d2d5128f7ee8a59f741ad5aafb4256a7c89","size":2636,"noattachment":false,"key":"/own-or-env/-/own-or-env-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/own-or-env/download/own-or-env-1.0.2.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/own-or-env_1.0.2_1631570247974_0.8021179348023979"},"_hasShrinkwrap":false,"publish_time":1631570248173,"_cnpm_publish_time":1631570248173},"1.0.1":{"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":{"shasum":"54ce601d3bf78236c5c65633aa1c8ec03f8007e4","size":2440,"noattachment":false,"key":"/own-or-env/-/own-or-env-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/own-or-env/download/own-or-env-1.0.1.tgz"},"maintainers":[{"name":"isaacs","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/own-or-env_1.0.1_1518458023062_0.3464231901305035"},"_hasShrinkwrap":false,"publish_time":1518458023108,"_cnpm_publish_time":1518458023108},"1.0.0":{"name":"own-or-env","version":"1.0.0","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":"node test.js"},"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","gitHead":"fdd6fdcda24ad7b8dbf2e9363e7d38e81061df07","_id":"own-or-env@1.0.0","_shasum":"9ef920fc81e2e63cf59d41101258368cf4fca4fb","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"9ef920fc81e2e63cf59d41101258368cf4fca4fb","size":1571,"noattachment":false,"key":"/own-or-env/-/own-or-env-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/own-or-env/download/own-or-env-1.0.0.tgz"},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/own-or-env-1.0.0.tgz_1484784248444_0.6228025830350816"},"directories":{},"publish_time":1484784250288,"_cnpm_publish_time":1484784250288,"_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","_attachments":{},"homepage":"https://github.com/isaacs/own-or-env#readme","bugs":{"url":"https://github.com/isaacs/own-or-env/issues"},"license":"ISC"}