Skip to content

darrenlooby/node-opt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-opt

Very basic options for NodeJS

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

Installation

npm install node-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.

No namespacing! Any part of your application can see the data.

Usage

var opt = require('node-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'

License

Creative Commons Licence
NodeOpt by Darren Looby is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at https://github.com/darrenlooby/node-opt.

About

Very basic options for NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published