lib/validator.js
function getArgvFromObject (options) {
	let argv = [];
	let format = options.format;

	if (formatList.get(format)) {
		argv.push(`--format ${format}`);
	}

	if (options.asciiquotes) {
		argv.push('--asciiquotes yes');
	}

	if (options.stream === false) {
		argv.push('--no-stream');
	}

	if (options.langdetect === false) {
		argv.push('--no-langdetect');
	}

	if (options.filterfile) {
		argv.push(`--filterfile ${options.filterfile}`);
	}

	if (options.filterpattern) {
		argv.push(`--filterpattern  ${options.filterpattern}`);
	}

	booleanArgs.forEach(key => {
		if (options[key]) {
			argv.push(`--${camel2dash(key)}`);
		}
	});

	return argv;
}
function getArgvFromObject (options) {
	let argv = [];
	let format = options.format;

	if (formatList.get(format)) {
		argv.push(`--format ${format}`);
	}

	if (options.asciiquotes) {
		argv.push('--asciiquotes yes');
	}

	if (options.stream === false) {
		argv.push('--no-stream');
	}

	if (options.langdetect === false) {
		argv.push('--no-langdetect');
	}

	if (options.filterfile) {
		argv.push(`--filterfile ${options.filterfile}`);
	}

	if (options.filterpattern) {
		argv.push(`--filterpattern  ${options.filterpattern}`);
	}

	booleanArgs.forEach(key => {
		if (options[key]) {
			argv.push(`--${camel2dash(key)}`);
		}
	});

	return argv;
}
function getArgvFromObject ( options ) { let argv = [ ] ; let format = options . format ; if ( formatList . get ( format ) ) { argv . push ( ` ${ format } ` ) ; } if ( options . asciiquotes ) { argv . push ( '--asciiquotes yes' ) ; } if ( options . stream === false ) { argv . push ( '--no-stream' ) ; } if ( options . langdetect === false ) { argv . push ( '--no-langdetect' ) ; } if ( options . filterfile ) { argv . push ( ` ${ options . filterfile } ` ) ; } if ( options . filterpattern ) { argv . push ( ` ${ options . filterpattern } ` ) ; } booleanArgs . forEach ( key => { if ( options [ key ] ) { argv . push ( ` ${ camel2dash ( key ) } ` ) ; } } ) ; return argv ; }
Get arguments from given object
@param {Object} options
@returns {Array}
@private
@sourceCode
Get arguments from given object