JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2280
  • Score
    100M100P100Q124436F
  • License BSD

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

Package Exports

  • ycb

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ycb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Yahoo! Configuration Bundle

Build Status

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.

Install

npm install ycb --save

Usage

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

License

BSD see LICENSE.txt