{"dist":{"shasum":"1be6c909e06f63b21ff7248af0bc012ffe64b4a0","tarball":"https://registry.npmjs.org/environment/-/environment-0.0.1.tgz","integrity":"sha512-cr7wZlIoKAltYJqyc8LhegPUtCt2VWgRGi13kFB7YlSsmh4G0ESfY6D+s56OtZoGW2WeJt5AGdQHTKv/bIN6JA==","signatures":[{"sig":"MEUCIQCQxpE0c3a9BtqZPcQEVlEAoiLdy9H4OSMmLM5YK5H9QwIgH/3j+ntI5RSo2H8oTggNwer5xtbETtmDHba+UuD2wEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"environment.js","name":"environment","author":{"url":"http://bbenvie.com","name":"Brandon Benvie","email":"brandon@bbenvie.com"},"readme":"# Environment\n\nProvides node's `process.env` object functionality as stand-alone functions instead of a C++ fake object that does weird things. As an added bonus, if running node with Proxies enabled (\"node --harmony\") it also exports a function that creates an `Environment` object that is similar to `process.env` but behaves like a real object.\n\n# Install\n\n\t\tnpm install environment\n\n# Use\nMostly self-explanatory:\n\n* __environment.get(key)__\n* __environment.set(key, value)__\n* __environment.delete(key)__\n* __environment.enumerate()__\n\n# Environment object\nIf `Proxy` is available, due to running node using the `--harmony` flag, a constructor is exported as well which allows the creation of `Environment` objects.\n\nThese objects aren't entirely normal JavaScript objects, but they're much closer than node's `process.env`. `Environment.prototype` doesn't inherit from `Object.prototype` but it does have most of the functions from it. `toString`, `valueOf`, `isPrototypeOf`, `hasOwnProperty`, as well as `constructor` pointing to `Environment`.\n\nIt's possible to add methods to `Environment.prototype` and have them work on instances correctly. It's possible to change an instance's `__proto__` and point it to something else and also have that work correctly (though Object.getPrototypeOf may not reflect the change).\n\n```javascript\n// normal creation\nvar env = require('environment').create();\n```\n```javascript\n// or modifying the prototype\nvar Environment = require('environment');\nEnvironment.prototype.paths = function paths(){\n\treturn this.PATH.split(process.platform === 'win32' ? ';' : ':');\n}\n\nvar env = new Environment;\nconsole.log(env.paths());\n```\n","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"homepage":"https://github.com/Benvie/node-environment","keywords":["env","environment","process.env"],"repository":{"url":"git://github.com/Benvie/node-environment.git","type":"git"},"description":"Provides node's `process.env` object functionality as stand-alone functions instead of a C++ fake object that does weird things. As an added bonus, if running node with Proxies enabled (\"node --harmony\") it also exports a function that creates an `Environment` object that is similar to `process.env` but behaves like a real object.","directories":{},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}],"_id":"environment@0.0.1","version":"0.0.1"}