ycb

YCB is a multi-dimensional configuration library that builds bundles from resource files describing a variety of values.

Yahoo! Configuration Bundle

YCB is a multi-dimensional configuration library that builds bundles from resource files describing a variety of values. The library allows applications to configure themselves based on multiple dimensions describing locations, languages, environments, etc.

More info on the wiki.

Examples are provided in this directory.

npm install ycb --save

var YCB = require('ycb');
var configArray = [
    {
        "dimensions": [
            {
                "environment": {
                    "dev": null,
                    "prod": null
                }
            }
        ]
    },
    {
        "settings": ["master"],
        "host": "example.com"
    },
    {
        "settings": ["environment:dev"],
        "host": "dev.example.com"
    }
];
 
var ycbObj = new YCB.Ycb(configArray),
var computedConfig = ycbObj.read({ environment: 'dev' });
 
console.log(computedConfig.host); // dev.example.com

BSD see LICENSE.txt