UNPKG

base-cli-process

Version:

Normalizers for common argv commands handled by the base-cli plugin. Also pre-processes the given object with base-cli-schema before calling `.process()`

22 lines (18 loc) 363 B
'use strict'; var debug = require('../debug'); /** * Set options. This is the API-equivalent of calling `app.option('foo', 'bar')`. * * ```sh * $ app --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(); }; };