$ gnpm install mixarg
mixin argument with defaults using minimist
$ npm install mixarg -g
var mixarg = require('mixarg');
var default = {
cwd: process.cwd(),
include: 'relative',
verbose: false
};
mixarg(defaults, '--verbose --include=all', {cwd: '/home/admin'});
// return
// {
// cwd: '/home/admin',
// include: 'all',
// verbose: true
// }
mixarg(arg1, ..., argN);
Copyright (c) 2014 popomore. Licensed under the MIT license.
Copyright 2013 - present © cnpmjs.org | Home |