Home > JSConfigurator

JSConfigurator

JSConfigurator is a project mainly written in JavaScript, it's free.

Configuration holder class for JS applications

Javascript configuration holder class

I often come across in my JS application that there are a lots of configuration values I want to pass from the server to my Javascript application. This small class was intended to solve this problem in an easy and clear way.

How to use

Create a new config object

Without parameters

var config = new JSConfigurator('default', {});

With some default parameters

var config = new JSConfigurator('default', {
 loaderImageUrl:  '/images/loader.gif',
 ajaxRefreshTime: 1000
});

Add some parameters to a namespace

config.putMore({
    loaderImageUrl:  '/images/loader2.gif',
    ajaxRefreshTime: 2000
}, 'something');
Previous:help.github.com