YCB ConfigYahoo 配置捆绑文件
YCB Config 提供了一个简单的 API 去访问和配置 Yahoo 配置捆绑文件,并可以无视文件使用格式。它也提供了一个缓存层来减少 YCB 模块对进程的调用。
示例代码:
// This contextual information is usually obtained from some custom middleware in your application. var context = { 'device': 'iphone', 'locale': 'en-US', 'bucket': 'new-feature-x'}; // This requires that the config we're reading has already been added through `addConfig`. helper.read('homepage', 'weather-widget', context, function (err, config) { /** * The `config` object now contains the correct configuration settings for * our context above. You can use it to render a template correctly for an * iPhone, with the right localization settings for the US, and with the new * feature you're bucket testing for. */});
评论
YCB多维度配置库
YCB是一个多维度配置库,它能从资源文件中建立包,来描述各种数值。此库可以让基于多维度的应用程序通过配置自己来描述位置、语言、环境等。示例代码:var YCB = require('ycb');var
YCB多维度配置库
0
vim_configVIM配置
精美的vim配置vim_config一款非常好用的vim配置,集成常用的插件,精美的配色,使用方法简单。如果你是一个vim新手,vim_config正适合你。如果你是vim高手,但又讨厌复杂的vim配
vim_configVIM配置
0