Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple class to keep track of your nodejs project settings.

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

readme.md

Node-Vars

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', 'test@example.com');


// abstract.js
var Vars = require('vars').Vars;

var username = Vars.get('username'); // rich
var newVar = Vars.get('newVar', 'new!');  // new!
Something went wrong with that request. Please try again.