{"_id":"safe-env","_rev":"5-6bf676e321df050ac52d94fdea082358","name":"safe-env","description":"Returns all environment variables with sensitive values hidden, great for logs","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"safe-env","version":"1.0.0","description":"Returns all environment variables with sensitive values hidden, great for logs","author":{"name":"Gleb Bahmutov","email":"gleb.bahmutov@gmail.com"},"bugs":{"url":"https://github.com/bahmutov/safe-env/issues"},"config":{"pre-git":{"commit-msg":"simple","pre-commit":["npm run deps","npm test"],"pre-push":["npm run secure","npm run license","npm run size"],"post-commit":[],"post-merge":[]}},"engines":{"node":">=6"},"files":["src/*.js","!src/*-spec.js"],"homepage":"https://github.com/bahmutov/safe-env#readme","keywords":["env","environment","log","safe","variable","variables"],"license":"MIT","main":"src/","noScopeName":"safe-env","publishConfig":{"registry":"http://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/bahmutov/safe-env.git"},"scripts":{"deps":"deps-ok","format":"standard-format -w src/*.js","issues":"git-issues","license":"license-checker --production --onlyunknown --csv","lint":"standard --verbose src/*.js","pretest":"npm run format && npm run lint","secure":"nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"NODE_PATH=.. npm run unit","unit":"mocha src/*-spec.js","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"devDependencies":{"check-more-types":"2.21.0","condition-node-version":"1.3.0","deps-ok":"1.1.0","git-issues":"1.2.0","lazy-ass":"1.4.0","license-checker":"5.1.2","mocha":"2.5.3","nsp":"2.4.0","pre-git":"3.9.1","semantic-release":"^4.3.5","standard":"7.1.2","standard-format":"2.2.1"},"dependencies":{"ramda":"0.21.0"},"release":{"verifyConditions":{"path":"condition-node-version","node":"4"}},"gitHead":"a3126aa7a4dca3000c4993aecd9c6444cde6ec0f","_id":"safe-env@1.0.0","_shasum":"86d22217c30bbfd45678a14994858fc87cf82d0e","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"},"dist":{"shasum":"86d22217c30bbfd45678a14994858fc87cf82d0e","tarball":"https://registry.npmjs.org/safe-env/-/safe-env-1.0.0.tgz","integrity":"sha512-Xv1UpmOyCd9w73TgYsjT/riBihmmkWGtCHCR3V0qdVpc7lTKgoyuK7RKC8kIy+tJQ68VOHTJGhnEaDOnBmMv7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC72U8U+8pQ5guMK1I+bMSjP973Dw0amAyGxJXtkcJPsgIhAJ6x3A8XKEeM5krXn8x5J0PYbjbr66KNw0VljicZxBDg"}]},"maintainers":[{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/safe-env-1.0.0.tgz_1466606926467_0.7324137575924397"}},"1.1.0":{"name":"safe-env","version":"1.1.0","description":"Returns all environment variables with sensitive values hidden, great for logs","author":{"name":"Gleb Bahmutov","email":"gleb.bahmutov@gmail.com"},"bugs":{"url":"https://github.com/bahmutov/safe-env/issues"},"config":{"pre-git":{"commit-msg":"simple","pre-commit":["npm run deps","npm test"],"pre-push":["npm run secure","npm run license","npm run size"],"post-commit":[],"post-merge":[]}},"engines":{"node":">=6"},"files":["src/*.js","!src/*-spec.js"],"homepage":"https://github.com/bahmutov/safe-env#readme","keywords":["env","environment","log","safe","variable","variables"],"license":"MIT","main":"src/","noScopeName":"safe-env","publishConfig":{"registry":"http://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/bahmutov/safe-env.git"},"scripts":{"deps":"deps-ok","format":"standard-format -w src/*.js","issues":"git-issues","license":"license-checker --production --onlyunknown --csv","lint":"standard --verbose src/*.js","pretest":"npm run format && npm run lint","secure":"nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"NODE_PATH=.. npm run unit","unit":"mocha src/*-spec.js","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"devDependencies":{"check-more-types":"2.22.0","condition-node-version":"1.3.0","deps-ok":"1.1.0","git-issues":"1.2.0","lazy-ass":"1.5.0","license-checker":"5.1.2","mocha":"3.0.2","nsp":"2.6.1","pre-git":"3.10.0","semantic-release":"6.3.0","standard":"8.0.0-beta.4","standard-format":"2.2.2"},"dependencies":{"ramda":"0.22.1"},"release":{"verifyConditions":{"path":"condition-node-version","node":"4"}},"gitHead":"b2649806a755b9fff4f71511490cc266d7f2c5ab","_id":"safe-env@1.1.0","_shasum":"f2d2497776da29a57decf617cbb7dc9a9f88db03","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"},"dist":{"shasum":"f2d2497776da29a57decf617cbb7dc9a9f88db03","tarball":"https://registry.npmjs.org/safe-env/-/safe-env-1.1.0.tgz","integrity":"sha512-bh1B3yvTDdliMFsZONg4V0xqGaMEqn3cdbq8TaY5qL4qyAMZM6RB9ALIgSu4uQGFrNrPrGjJBTAbqcbuey8sRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJkTlbZDecqjPdSHSJSnIc6AcZQmj+7OeGoE3scgHvFAiEAss99F6P4L0oMsfuwkrMegYoaJfApAE8HgpmyFuoARbI="}]},"maintainers":[{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/safe-env-1.1.0.tgz_1471313760360_0.8622011130210012"}},"1.2.0":{"name":"safe-env","version":"1.2.0","description":"Returns all environment variables with sensitive values hidden, great for logs","author":{"name":"Gleb Bahmutov","email":"gleb.bahmutov@gmail.com"},"bugs":{"url":"https://github.com/bahmutov/safe-env/issues"},"config":{"pre-git":{"commit-msg":"simple","pre-commit":["npm run deps","npm test"],"pre-push":["npm run secure","npm run license","npm run size"],"post-commit":[],"post-merge":[]}},"engines":{"node":">=6"},"files":["src/*.js","!src/*-spec.js"],"homepage":"https://github.com/bahmutov/safe-env#readme","keywords":["env","environment","log","safe","variable","variables"],"license":"MIT","main":"src/","noScopeName":"safe-env","publishConfig":{"registry":"http://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/bahmutov/safe-env.git"},"scripts":{"deps":"deps-ok","format":"standard-format -w src/*.js","issues":"git-issues","license":"license-checker --production --onlyunknown --csv","lint":"standard --verbose src/*.js","pretest":"npm run format && npm run lint","secure":"nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"NODE_PATH=.. npm run unit","unit":"mocha src/*-spec.js","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"devDependencies":{"check-more-types":"2.22.0","condition-node-version":"1.3.0","deps-ok":"1.1.0","git-issues":"1.2.0","lazy-ass":"1.5.0","license-checker":"5.1.2","mocha":"3.0.2","nsp":"2.6.1","pre-git":"3.10.0","semantic-release":"6.3.0","standard":"8.0.0-beta.4","standard-format":"2.2.2"},"dependencies":{"ramda":"0.22.1"},"release":{"verifyConditions":{"path":"condition-node-version","node":"4"}},"gitHead":"4a1323aff5d9c90d1e4e9cf4067048d609f01832","_id":"safe-env@1.2.0","_shasum":"d5b65e0f147e7b7edd5593b9e1fd4bd710e0254f","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"},"dist":{"shasum":"d5b65e0f147e7b7edd5593b9e1fd4bd710e0254f","tarball":"https://registry.npmjs.org/safe-env/-/safe-env-1.2.0.tgz","integrity":"sha512-ZXgxTHGRAVh6jYgEzCi2Xl/HoAWvl3wUtquILGqXtb4qdoPjMaPe+Wx8acXlxjzrxt2WzecfxJUk19RUtFhewQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXTsE7a8zV5UJI+FVZP7G9g2RYRBNAN6ZhCtxFS8WC6AiA3xSYVqFo72G+NZCdD97z0PT/gLp46BZj0ZJS0CYD5Fw=="}]},"maintainers":[{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/safe-env-1.2.0.tgz_1471314622459_0.5918044541031122"}}},"readme":"# safe-env\n\n> Returns all environment variables with sensitive values hidden, great for logs\n\n[![NPM][npm-icon] ][npm-url]\n\n[![Build status][ci-image] ][ci-url]\n[![semantic-release][semantic-image] ][semantic-url]\n[![js-standard-style][standard-image]][standard-url]\n\nWhen you start the server, and something does not work, are you sure that all expected\nenvironment variables were set correctly? Can you quickly dump them to a console or send them\nto the logging service? Can you hide the sensitive information, like passwords or tokens?\n\n## Example\n\n```js\nconst safeEnv = require('safe-env')\nconst sensitive = ['TOKEN', 'API-KEY']\nconsole.log(safeEnv(sensitive))\n/*\n{\n  FOO: 'foo value',\n  BAR: 'bar value',\n  TOKEN: '<hidden>'\n}\n*/\n```\n\nSeems we forgot to set `API-KEY`!\n\n## Options\n\nYou can pass an object to be filtered instead of using `process.env`\n\n```js\nconst result = safeEnv(sensitive, myObject)\n```\n\n## Details\n\n* Only all uppercase keys from `process.env` are printed,\n  filtering out lots of noise, like `npm_...` keys.\n* There is a [default list](src/private-keys.js) of sensitive keys, if you do not pass any.\n* Only top level properties are replaced\n\n## Custom predicate function\n\nYou can pass a custom predicate function that returns true based on the\nproperty name to filter custom values. For example to hide all properties\nwith string 'token' in them\n\n```js\nconst o = {\n  foo: 42,\n  myToken: 'secret',\n  'another-token': 'very secret'\n}\nconst tokenName = (key) => key.toLowerCase().indexOf('token') !== -1\nconst out = safeEnv(tokenName, o)\n// out has both 'myToken' and 'another-token' values replaced\n// with '<hidden>'\n```\n\n### Small print\n\nAuthor: Gleb Bahmutov &lt;gleb.bahmutov@gmail.com&gt; &copy; 2016\n\n* [@bahmutov](https://twitter.com/bahmutov)\n* [glebbahmutov.com](http://glebbahmutov.com)\n* [blog](http://glebbahmutov.com/blog)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/safe-env/issues) on Github\n\n## MIT License\n\nCopyright (c) 2016 Gleb Bahmutov &lt;gleb.bahmutov@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n[npm-icon]: https://nodei.co/npm/safe-env.svg?downloads=true\n[npm-url]: https://npmjs.org/package/safe-env\n[ci-image]: https://travis-ci.org/bahmutov/safe-env.svg?branch=master\n[ci-url]: https://travis-ci.org/bahmutov/safe-env\n[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n[semantic-url]: https://github.com/semantic-release/semantic-release\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n[standard-url]: http://standardjs.com/\n","maintainers":[{"name":"bahmutov","email":"gleb.bahmutov@gmail.com"}],"time":{"modified":"2022-06-26T15:19:10.539Z","created":"2016-06-22T14:48:48.959Z","1.0.0":"2016-06-22T14:48:48.959Z","1.1.0":"2016-08-16T02:16:02.025Z","1.2.0":"2016-08-16T02:30:24.969Z"},"homepage":"https://github.com/bahmutov/safe-env#readme","keywords":["env","environment","log","safe","variable","variables"],"repository":{"type":"git","url":"git+https://github.com/bahmutov/safe-env.git"},"author":{"name":"Gleb Bahmutov","email":"gleb.bahmutov@gmail.com"},"bugs":{"url":"https://github.com/bahmutov/safe-env/issues"},"license":"MIT","readmeFilename":"README.md"}