文件名称:Yahoo配置捆绑文件YCBConfig.zip
文件大小:26KB
文件格式:ZIP
更新时间:2022-08-06 18:37:58
开源项目
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. */}); 标签:YCBConfig
【文件预览】:
ycb-config-master
----.travis.yml(48B)
----HISTORY.md(919B)
----package.json(1KB)
----tests()
--------lib()
--------fixtures()
----CONTRIBUTING.md(995B)
----.gitignore(77B)
----lib()
--------index.js(22KB)
----README.md(6KB)
----LICENSE.txt(1KB)