lib/index.js
function addArg(args, name, val) {
  if (!val && val !== 0) {
    return;
  }
  var arg = name.length > 1 ? '--' + _.kebabCase(name) : '-' + name;
  // --max-old-space-size argument requires an `=`
  if (arg === '--max-old-space-size') {
    args.push(arg + '=' + val);
    return;
  } else {
    args.push(arg);
  }
  if (_.isString(val) || _.isNumber(val)) {
    args.push(val);
  }
}
function addArg(args, name, val) {
  if (!val && val !== 0) {
    return;
  }
  var arg = name.length > 1 ? '--' + _.kebabCase(name) : '-' + name;
  // --max-old-space-size argument requires an `=`
  if (arg === '--max-old-space-size') {
    args.push(arg + '=' + val);
    return;
  } else {
    args.push(arg);
  }
  if (_.isString(val) || _.isNumber(val)) {
    args.push(val);
  }
}
function addArg ( args , name , val ) { if ( ! val && val !== 0 ) { return ; } var arg = name . length > 1 ? '--' + _ . kebabCase ( name ) : '-' + name ; // --max-old-space-size argument requires an `=` if ( arg === '--max-old-space-size' ) { args . push ( arg + '=' + val ) ; return ; } else { args . push ( arg ) ; } if ( _ . isString ( val ) || _ . isNumber ( val ) ) { args . push ( val ) ; } }
Adds a given argument with name and value to arugment array.
@param {Array}  args String array of arguments.
@param {String} name Name of the argument.
@param {String} val  Value of the argument. Returns without doing anything
if falsy and not zero.
Adds a given argument with name and value to arugment array .