Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

configjson

0.0.5 • Public • Published

Configuration cjson

Is a wrapper for configuration with CJSON.

How to use it:

var config = require('configjson');
var myConfig = new config([
    'file1.json',
    'file2.json',
], {
    "hello" : ":)"
});

Make a call the variables.

myConfig.get(name);
myConfig.set(obj);
myConfig.set(name, val);
myconfig.enable(name);
myconfig.disable(name);
myconfig.enabled(name);
myconfig.disabled(name);

Make configurable

myConfig.configure("test", function(){
    // Only run in Test
});
 
myconfig.configure("production", function(){
    // Only run in Production
});
 
myconfig.configure(function(){
    // Run in All
});
 

install

npm i configjson

Downloadsweekly downloads

1

version

0.0.5

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar