node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »



Vars is a simple class to help you manage your project settings. The use is very simple with a one to one relationship.

It provides a simple API to get/set variables. When you call get() you can also pass in a default value in case that setting does not exist.

// settings.js 
var Vars = require('vars').Vars;
Vars.set('username', 'rich');
Vars.set('email', '');
// abstract.js 
var Vars = require('vars').Vars;
var username = Vars.get('username'); // rich 
var newVar = Vars.get('newVar', 'new!');  // new!