| 1 |
{ |
| 2 |
"_id": "own-or-env", |
| 3 |
"_rev": "2-df007eddf7bd6cfc76179be2b8e0c528", |
| 4 |
"name": "own-or-env", |
| 5 |
"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.", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "1.0.1" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"1.0.0": { |
| 11 |
"name": "own-or-env", |
| 12 |
"version": "1.0.0", |
| 13 |
"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.", |
| 14 |
"main": "own-or-env.js", |
| 15 |
"scripts": { |
| 16 |
"test": "node test.js" |
| 17 |
}, |
| 18 |
"repository": { |
| 19 |
"type": "git", |
| 20 |
"url": "git+https://github.com/isaacs/own-or-env.git" |
| 21 |
}, |
| 22 |
"author": { |
| 23 |
"name": "Isaac Z. Schlueter", |
| 24 |
"email": "[email protected]", |
| 25 |
"url": "http://blog.izs.me/" |
| 26 |
}, |
| 27 |
"license": "ISC", |
| 28 |
"bugs": { |
| 29 |
"url": "https://github.com/isaacs/own-or-env/issues" |
| 30 |
}, |
| 31 |
"homepage": "https://github.com/isaacs/own-or-env#readme", |
| 32 |
"gitHead": "fdd6fdcda24ad7b8dbf2e9363e7d38e81061df07", |
| 33 |
"_id": "[email protected]", |
| 34 |
"_shasum": "9ef920fc81e2e63cf59d41101258368cf4fca4fb", |
| 35 |
"_from": ".", |
| 36 |
"_npmVersion": "3.10.10", |
| 37 |
"_nodeVersion": "6.9.4", |
| 38 |
"_npmUser": { |
| 39 |
"name": "isaacs", |
| 40 |
"email": "[email protected]" |
| 41 |
}, |
| 42 |
"dist": { |
| 43 |
"shasum": "9ef920fc81e2e63cf59d41101258368cf4fca4fb", |
| 44 |
"tarball": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.0.tgz" |
| 45 |
}, |
| 46 |
"maintainers": [ |
| 47 |
{ |
| 48 |
"name": "isaacs", |
| 49 |
"email": "[email protected]" |
| 50 |
} |
| 51 |
], |
| 52 |
"_npmOperationalInternal": { |
| 53 |
"host": "packages-18-east.internal.npmjs.com", |
| 54 |
"tmp": "tmp/own-or-env-1.0.0.tgz_1484784248444_0.6228025830350816" |
| 55 |
}, |
| 56 |
"directories": {} |
| 57 |
}, |
| 58 |
"1.0.1": { |
| 59 |
"name": "own-or-env", |
| 60 |
"version": "1.0.1", |
| 61 |
"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.", |
| 62 |
"main": "own-or-env.js", |
| 63 |
"scripts": { |
| 64 |
"test": "tap test.js --100", |
| 65 |
"preversion": "npm test", |
| 66 |
"postversion": "npm publish", |
| 67 |
"postpublish": "git push origin --all; git push origin --tags" |
| 68 |
}, |
| 69 |
"repository": { |
| 70 |
"type": "git", |
| 71 |
"url": "git+https://github.com/isaacs/own-or-env.git" |
| 72 |
}, |
| 73 |
"author": { |
| 74 |
"name": "Isaac Z. Schlueter", |
| 75 |
"email": "[email protected]", |
| 76 |
"url": "http://blog.izs.me/" |
| 77 |
}, |
| 78 |
"license": "ISC", |
| 79 |
"bugs": { |
| 80 |
"url": "https://github.com/isaacs/own-or-env/issues" |
| 81 |
}, |
| 82 |
"homepage": "https://github.com/isaacs/own-or-env#readme", |
| 83 |
"dependencies": { |
| 84 |
"own-or": "^1.0.0" |
| 85 |
}, |
| 86 |
"devDependencies": { |
| 87 |
"tap": "^11.1.0" |
| 88 |
}, |
| 89 |
"gitHead": "31d69cd54ae14e5d605696bc58a77091d78b37ac", |
| 90 |
"_id": "[email protected]", |
| 91 |
"_npmVersion": "5.6.0-canary.11", |
| 92 |
"_nodeVersion": "8.9.1", |
| 93 |
"_npmUser": { |
| 94 |
"name": "isaacs", |
| 95 |
"email": "[email protected]" |
| 96 |
}, |
| 97 |
"dist": { |
| 98 |
"integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", |
| 99 |
"shasum": "54ce601d3bf78236c5c65633aa1c8ec03f8007e4", |
| 100 |
"tarball": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", |
| 101 |
"fileCount": 8, |
| 102 |
"unpackedSize": 4908 |
| 103 |
}, |
| 104 |
"maintainers": [ |
| 105 |
{ |
| 106 |
"name": "isaacs", |
| 107 |
"email": "[email protected]" |
| 108 |
} |
| 109 |
], |
| 110 |
"directories": {}, |
| 111 |
"_npmOperationalInternal": { |
| 112 |
"host": "s3://npm-registry-packages", |
| 113 |
"tmp": "tmp/own-or-env_1.0.1_1518458023062_0.3464231901305035" |
| 114 |
} |
| 115 |
} |
| 116 |
}, |
| 117 |
"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", |
| 118 |
"maintainers": [ |
| 119 |
{ |
| 120 |
"name": "isaacs", |
| 121 |
"email": "[email protected]" |
| 122 |
} |
| 123 |
], |
| 124 |
"time": { |
| 125 |
"modified": "2018-02-12T17:53:44.723Z", |
| 126 |
"created": "2017-01-19T00:04:10.288Z", |
| 127 |
"1.0.0": "2017-01-19T00:04:10.288Z", |
| 128 |
"1.0.1": "2018-02-12T17:53:43.108Z" |
| 129 |
}, |
| 130 |
"homepage": "https://github.com/isaacs/own-or-env#readme", |
| 131 |
"repository": { |
| 132 |
"type": "git", |
| 133 |
"url": "git+https://github.com/isaacs/own-or-env.git" |
| 134 |
}, |
| 135 |
"author": { |
| 136 |
"name": "Isaac Z. Schlueter", |
| 137 |
"email": "[email protected]", |
| 138 |
"url": "http://blog.izs.me/" |
| 139 |
}, |
| 140 |
"bugs": { |
| 141 |
"url": "https://github.com/isaacs/own-or-env/issues" |
| 142 |
}, |
| 143 |
"license": "ISC", |
| 144 |
"readmeFilename": "README.md", |
| 145 |
"_attachments": {} |
| 146 |
} |