findDefinnition(arg) {
    const eqIndex = arg.indexOf('=');
    if (eqIndex !== -1) {
      arg = arg.substr(0, eqIndex);
    }
    if (arg.indexOf('--') === 0) {
      return this.availableOptions.find((item) => item.name === arg);
    } else if (arg.indexOf('-') === 0) {
      return this.availableOptions.find((item) => item.shortcut === arg);
    }
  }
/**
   * Finds an option definition from an argument.
   *
   * @param {String} arg Argument passed to the application.
   * @return {Object} Option definition or undefined if not found.
   */
Finds an option definition from an argument.
@param {String} arg Argument passed to the application.
@return {Object} Option definition or undefined if not found.
Finds an option definition from an argument . @param { String } arg Argument passed to the application . @return { Object } Option definition or undefined if not found .
findDefinnition(arg) {
    const eqIndex = arg.indexOf('=');
    if (eqIndex !== -1) {
      arg = arg.substr(0, eqIndex);
    }
    if (arg.indexOf('--') === 0) {
      return this.availableOptions.find((item) => item.name === arg);
    } else if (arg.indexOf('-') === 0) {
      return this.availableOptions.find((item) => item.shortcut === arg);
    }
  }
findDefinnition ( arg ) { const eqIndex = arg . indexOf ( '=' ) ; if ( eqIndex !== - 1 ) { arg = arg . substr ( 0 , eqIndex ) ; } if ( arg . indexOf ( '--' ) === 0 ) { return this . availableOptions . find ( ( item ) => item . name === arg ) ; } else if ( arg . indexOf ( '-' ) === 0 ) { return this . availableOptions . find ( ( item ) => item . shortcut === arg ) ; } }
Finds an option definition from an argument.
Finds an option definition from an argument .