|  | vor 10 Jahren | |
|---|---|---|
| .. | ||
| dargs.js | vor 10 Jahren | |
| package.json | vor 10 Jahren | |
| readme.md | vor 10 Jahren | |

Converts an object of options into an array of command-line arguments
Install: npm install --save dargs
var dargs = require('dargs');
var options = {
	foo: 'bar',
	hello: true,                    // results in only the key being used
	cake: false,                    // ignored
	camelCase: 5,                   // camelCase is slugged to `camel-case`
	multiple: ['value', 'value2'],  // converted to multiple arguments
	sad: ':('
};
var excludes = ['sad'];
console.log(dargs(options, excludes));
/*
[
	'--foo', 'bar',
	'--hello',
	'--camel-case', '5',
	'--multiple', 'value',
	'--multiple', 'value2'
]
*/
Object of options to convert to command-line arguments.
Array of keys to exclude.
MIT License • © Sindre Sorhus