base-config-process
Version:
Commonly used config mappings for the base-config plugin. Also pre-processes the given object with base-config-schema before calling `.process()`
23 lines (19 loc) • 447 B
JavaScript
;
var debug = require('../debug');
/**
* Merge options onto the `app.options` object. If the [base-option][] plugin
* is registered, this is the API-equivalent of calling `app.option()`.
*
* ```json
* {"verb": {"options": {"foo": "bar"}}}
* ```
* @name options
* @api public
*/
module.exports = function(app) {
return function(val, key, config, next) {
debug.field(key, val);
app.option(val);
next();
};
};