Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

jamlfy/configjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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
});

About

Configuration cjson

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published