{"_id":"@clayton-state-university/whenv","_rev":"4-902141ef1cafb82a792b1b778badcd20","name":"@clayton-state-university/whenv","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@clayton-state-university/whenv","version":"0.1.2","description":"A simple utility easily determine which value should be used based on which environment is being used. ","main":"index.js","scripts":{"test":"mocha"},"author":"","license":"ISC","devDependencies":{"mocha":"^3.1.0"},"dependencies":{"os":"^0.1.1"},"gitHead":"64957b8c2e0c6d67d5a103fd3334e650a19d2104","_id":"@clayton-state-university/whenv@0.1.2","_nodeVersion":"10.16.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-+7PT7kcIgvRlM9ymjmTSwOvnteZaXJShVwwtcjuVKT1dG44DUh8Y4f18yTSxruyS0pY1xLOjAv2goTOkasAonA==","shasum":"f74efdd2e01f2afae52239915016ff41f0f079b3","tarball":"https://registry.npmjs.org/@clayton-state-university/whenv/-/whenv-0.1.2.tgz","fileCount":5,"unpackedSize":4219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwBmxCRA9TVsSAnZWagAAYfMP+wYb3TdpWtqivDWRg6/H\ngdoKW/oAtBjzPRcnfVJqI/JqsCOEn5yuSHQ5ydDk1tSUxY+DUKO8H6K68Dv9\nWkNY3aYntqDBf0SPyb24Zoi46+/TdfVQrJtRQgF3/bUzwtzASrJRoidkwaL0\nO284l8gOTlDhyIl1qyfmJ24Jl+HGH1DgR372sUvYPQlPKLzHvyOjymilB5sh\nivO+OwoXOeU7Xho90tY/UO4X8k0QyQaa1MdRCsXzn5w65grO/AQ5a2Hzmjni\n+sx69p8kMzsArRfiyR+3SsXR8Mag2SzIpamdwUmWV64lmOeUh1Bb+7fR4Vja\nhB1U8SzK069FU+l/E05VZ+SlgtPWw+/fUbVaUcnfcxYxwceaPDXXHPqTPfWl\neRtwvPtJ2Mj8njvaV0NY2Li6IXszWcKMj18CZ6ynYhiF1rq/CwLmtAMe97Bc\nij4ff+5pA87mmFwfUQxcOhb8zry2phprpC6P4y1gy8kJoeZp5SLDirz9ZUXe\nF3W4x1xvPoQOJMdMUNTzAq0utcNUxbahbF3TW6xogmZ76Z/QKQ0Ld0yrqVpM\nnMcuPSxKaj2+lY8K1jhHW4Kiwa+eBU5HPrhg6FTiX2dku/4WFje1QInn++na\n3kiq8EB49vplb8YWr3Q/iwwlI8EavmXgjKOjZxd6rFFSsX/ihV/bojhzYHPt\n4SUC\r\n=PaER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFYQClTZ6ckd16W0fu9UvgvA4yZAo7t7zfuWOhL1IF9AiAlLPXsPm2FstnYDH0SqiPbUFxpHijJ47BfhJVsGQsmNA=="}]},"maintainers":[{"name":"charlesread","email":"charles@charlesread.io"}],"_npmUser":{"name":"charlesread","email":"charles@charlesread.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whenv_0.1.2_1572870576845_0.14494846402959838"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-04T12:29:36.621Z","0.1.2":"2019-11-04T12:29:37.059Z","modified":"2022-04-04T23:14:38.640Z"},"maintainers":[{"email":"jonathonGoodson@clayton.edu","name":"jgoodson2"},{"email":"giangphan@clayton.edu","name":"giangphan"},{"email":"shusainy@clayton.edu","name":"shusainy"},{"email":"charles@charlesread.io","name":"charlesread"}],"description":"A simple utility easily determine which value should be used based on which environment is being used. ","license":"ISC","readme":"# whenv\nA simple utility easily determine **wh**ich value should be used based on which **env**ironment is being used.\n\nIt works by looking at the hostname of the system on which it is run and depends on the strings `prod`, `qa`, or `dev` being contained in the hostname.\n\n## Examples\n\n### Callback\n```javascript\nconst Whenv = require('whenv')\nlet postUrl = new Whenv('http://produrl.domain.com', 'http://qaurl.domain.com', 'http://devurl.domain.com')\npostUrl.setHostname('devscripts.domain.com') //NOTE: the hostname will be automatically determined, but you can override it with whenv.setHostname\npostUrl.decide((url) => {\n    console.log(url) //http://devurl.domain.com\n})\n```\n### Promise\n```javascript\nconst Whenv = require('whenv')\nlet postUrl = new Whenv('http://produrl.domain.com', 'http://qaurl.domain.com', 'http://devurl.domain.com')\npostUrl.setHostname('prodscripts.domain.com') //NOTE: the hostname will be automatically determined, but you can override it with whenv.setHostname\npostUrl.decide()\n    .then(console.log) //http://produrl.domain.com\n```","readmeFilename":"README.md"}