1.0.1 • Published 11 years ago

node-opt v1.0.1

Weekly downloads
12
License
-
Repository
github
Last release
11 years ago

node-opt

Very basic options for NodeJS

OptJS - is a very small options store for your NodeJS applicaiotn.

Installation

npm install opt

Bit more detail

Stores options as pairs in an object. It's not multidementional. It's flat! Values can be objects themselves - but, names are strings.

Usage

var opt = require('./opt');

opt();
// returns all params that are stored

opt({obj});
// stores a set of pairs (overwriting).
//If JSON can be string and will break functionality (won't throw error however)

opt('name');
// returns the value associated with that name

opt('name', 'value');
// sets a single option of 'name' to 'value'