index.js
function cmd(patterns, options) {
  var str = normalize(patterns);
  var keys = Object.keys(options);
  var args = [];
  var valid = [
    'dotglob',
    'extglob',
    'failglob',
    'globstar',
    'nocaseglob',
    'nullglob'
  ];

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (valid.indexOf(key) !== -1) {
      args.push('-O', key);
    }
  }

  args.push('-c', 'for i in ' + str + '; do echo $i; done');
  return args;
}
function cmd(patterns, options) {
  var str = normalize(patterns);
  var keys = Object.keys(options);
  var args = [];
  var valid = [
    'dotglob',
    'extglob',
    'failglob',
    'globstar',
    'nocaseglob',
    'nullglob'
  ];

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (valid.indexOf(key) !== -1) {
      args.push('-O', key);
    }
  }

  args.push('-c', 'for i in ' + str + '; do echo $i; done');
  return args;
}
function cmd ( patterns , options ) { var str = normalize ( patterns ) ; var keys = Object . keys ( options ) ; var args = [ ] ; var valid = [ 'dotglob' , 'extglob' , 'failglob' , 'globstar' , 'nocaseglob' , 'nullglob' ] ; for ( var i = 0 ; i < keys . length ; i ++ ) { var key = keys [ i ] ; if ( valid . indexOf ( key ) !== - 1 ) { args . push ( '-O' , key ) ; } } args . push ( '-c' , 'for i in ' + str + '; do echo $i; done' ) ; return args ; }
Create the command to use
Create the command to use