{"dist":{"shasum":"2d82630392999501eaabb5a233c9ccc2cf99da58","tarball":"https://registry.npmjs.org/environment/-/environment-0.0.2.tgz","integrity":"sha512-HpLLIMza5laA5OhQDjgsaQR3VJeW7eTckJ6fY8BQOzKN7g1HeZx6x1cDL8Kmm3dr4dmoOhQnnaz7YHAVMKA+RA==","signatures":[{"sig":"MEQCIDIcOimwgDRLKthpcmmjjRjSfRv82BkPYliaHmV+uixyAiBc5tUHl+ufHJiFELQNqPvEk3LYMow2yqHNL9KJWFnKDQ==","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.2","version":"0.0.2"}