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, {
    repeatTimes,
    separator = "+",
    addition,
    additionRepeatTimes,
    additionSeparator = '|',
  }) {
    if (str === null) str = 'null';
    if (addition === null) addition = 'null'
    let add = Array(additionRepeatTimes).fill(addition)
    let main = Array(repeatTimes).fill(str + add.join(`${additionSeparator}`))
    console.log(main.join(separator))
    return main.join(separator)
  }
  
  console.log(repeater('STRING', {
    repeatTimes: 3,
    separator: '**',
    addition: 'PLUS',
    additionRepeatTimes: 3,
    additionSeparator: '00'
  }))