Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Configuration cjson
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
LICENSE
README.md
package.json

README.md

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
});
Something went wrong with that request. Please try again.