demo/commander/index.js
function Option(flags, description) {
  this.flags = flags;
  this.required = ~flags.indexOf('<');
  this.optional = ~flags.indexOf('[');
  this.bool = !~flags.indexOf('-no-');
  flags = flags.split(/[ ,|]+/);
  if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
  this.long = flags.shift();
  this.description = description || '';
}
function Option(flags, description) {
  this.flags = flags;
  this.required = ~flags.indexOf('<');
  this.optional = ~flags.indexOf('[');
  this.bool = !~flags.indexOf('-no-');
  flags = flags.split(/[ ,|]+/);
  if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
  this.long = flags.shift();
  this.description = description || '';
}
function Option ( flags , description ) { this . flags = flags ; this . required = ~ flags . indexOf ( '<' ) ; this . optional = ~ flags . indexOf ( '[' ) ; this . bool = ! ~ flags . indexOf ( '-no-' ) ; flags = flags . split ( / [ ,|]+ / ) ; if ( flags . length > 1 && ! / ^[[<] / . test ( flags [ 1 ] ) ) this . short = flags . shift ( ) ; this . long = flags . shift ( ) ; this . description = description || '' ; }
Initialize a new `Option` with the given `flags` and `description`.

@param {String} flags
@param {String} description
@api public
Initialize a new Option with the given flags and description .