text: import { NotImplementedError } from "../extensions/index.js";
  
  /**
   * Create a repeating string based on the given parameters
   *
   * @param {String} str string to repeat
   * @param {Object} options options object
   * @return {String} repeating string
   *
   *
   * @example
   *
   * repeater('STRING', { repeatTimes: 3, separator: '**',
   * addition: 'PLUS', additionRepeatTimes: 3, additionSeparator: '00' })
   * => 'STRINGPLUS00PLUS00PLUS**STRINGPLUS00PLUS00PLUS**STRINGPLUS00PLUS00PLUS'
   *
   */
  export default function repeater(str, options) {
    if (options.separator === undefined) {
      options.separator = "+";
    }
    if (options.addition === undefined) {
      options.addition = "";
    }
    if (options.additionSeparator === undefined) {
      options.additionSeparator = "|";
    }
    let add = options.addition;
    for (let i = 1; i < options.additionRepeatTimes; i++) {
      add = add + options.additionSeparator + options.addition;
    }
    let newStr = str + add;
    for (let a = 1; a < options.repeatTimes; a++) {
      newStr = newStr + options.separator + str + add;
    }
    return newStr;
  }
  