src/third_party/mozjs/extract/js/src/devtools/gc-ubench/argparse.js
// will match the first parameter added to the ArgParser.
will match the first parameter added to the ArgParser.
will match the first parameter added to the ArgParser .
add_argument(name, spec) {
    const names = Array.isArray(name) ? name : [name];
    spec = Object.assign({}, spec);
    spec.aliases = names;
    for (const name of names) {
      if (!name.startsWith("-")) {
        throw new Error(`unhandled argument syntax '${name}'`);
      }
      if (name.startsWith("--")) {
        spec.dest = spec.dest || name.substr(2);
      }
      this._params.push({ name, spec });
    }
  }
add_argument ( name , spec ) { const names = Array . isArray ( name ) ? name : [ name ] ; spec = Object . assign ( { } , spec ) ; spec . aliases = names ; for ( const name of names ) { if ( ! name . startsWith ( "-" ) ) { throw new Error ( ` ${ name } ` ) ; } if ( name . startsWith ( "--" ) ) { spec . dest = spec . dest || name . substr ( 2 ) ; } this . _params . push ( { name , spec } ) ; } }
will match the first parameter added to the ArgParser.
will match the first parameter added to the ArgParser .