New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

atmosphere

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atmosphere - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.jshintrc

24

lib/index.js
'use strict';
module.exports = function () {
if (!process.env) { process.env = {}; }
return process.env;
// Modules
var _ = require('lodash');
module.exports = function (environment, config) {
// Ensure environment is an object
if (!_.isObject(environment)) {
throw new Error('Fatal: Provided environment is not an object!');
}
// Merge configuration object, if given
if (_.isObject(config)) {
_.merge(environment, config);
}
return {
get : function (name) {
return environment[name];
}
};
};
{
"name": "atmosphere",
"version": "0.0.1",
"version": "0.0.2",
"description": "Node.js Environment Variable Management",

@@ -10,3 +10,13 @@ "author": "Ryan Lelek <ryanlelek@gmail.com>",

},
"main": "./lib/index.js"
"main": "./lib/index.js",
"dependencies" : {
"lodash" : "2.4.1"
},
"devDependencies" : {
"mocha" : "1.20.1",
"should" : "4.0.1"
},
"scripts" : {
"test" : "make test"
}
}

@@ -1,4 +0,29 @@

atmosphere
Atmosphere
==========
Node.js Environment Variable Management
# Why should I use this?
- prevents writing "process.env" everywhere in your project's code.
- increases testability because you can mock different environments (due to above)
# How to Use
## 1) Install via NPM
$ npm install atmosphere
## 2) Initialize
// process.env can be substituted for any object
var atmo = require('atmosphere)(process.env);
## 3) Get Variables
// Access Environment Variables
atmo.get('port'); // 3000
# Upcoming
- Environment Variable Prefix (MYAPP_PORT -> PORT)
- Auto-capitalization (port -> PORT)
- Replacing spaces with underscores
- Converting the return value to another type ('3000' -> 3000)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc