mergeDuplicateOption(key) {
    let duplicateOptions, mergedOption, mergedAliases;
    // get duplicates to merge
    duplicateOptions = this.availableOptions.filter((option) => option.name === key);

    if (duplicateOptions.length > 1) {
      // TODO: warn on duplicates and overwriting
      mergedAliases = duplicateOptions.flatMap((option) => option.aliases);

      // merge duplicate options
      mergedOption = Object.assign.apply(null, duplicateOptions);

      // replace aliases with unique aliases
      mergedOption.aliases = uniqBy(mergedAliases, (alias) => {
        if (typeof alias === 'object') {
          return alias[Object.keys(alias)[0]];
        }
        return alias;
      });

      // remove duplicates from options
      this.availableOptions = reject(this.availableOptions, { name: key });
      this.availableOptions.push(mergedOption);
    }

    return this.availableOptions;
  }
Merges any options with duplicate keys in the availableOptions array.
    Used primarily by registerOptions.
    @method mergeDuplicateOption
    @param {String} key
    @return {Object}