text: "use strict";
  /**
   *
   * Callable function with the initial plugins
   *
   * @returns {Function} An function that returns an array
   * that consists of terser-webpack-plugin
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.generatePluginName = exports.replaceAt = void 0;
  function default_1() {
      return ['new TerserPlugin()'];
  }
  exports.default = default_1;
  /**
   *
   * Replaces the string with a substring at the given index
   * https://gist.github.com/efenacigiray/9367920
   *
   * @param	{String} str - string to be modified
   * @param	{Number} index - index to replace from
   * @param	{String} replace - string to replace starting from index
   *
   * @returns	{String} string - The newly mutated string
   *
   */
  exports.replaceAt = (str, index, replace) => {
      return str.substring(0, index) + replace + str.substring(index + 1);
  };
  /**
   *
   * Generate a webpack standard webpack plugin name from the plugin name from the Answer
   *
   * @param	{String} rawPluginName - plugin name from answer
   *
   * @returns	{String} string - the webpack standard plugin name
   *
   */
  exports.generatePluginName = (rawPluginName) => {
      const myPluginNameArray = rawPluginName.split('-');
      const pluginArrLength = myPluginNameArray.length;
      // ignore plugin names without hyphens to allow for cases
      // such as webpack.DefinePlugin, which should not be capitalized
      for (let i = 0; i < pluginArrLength && pluginArrLength > 1; i++) {
          myPluginNameArray[i] = exports.replaceAt(myPluginNameArray[i], 0, myPluginNameArray[i].charAt(0).toUpperCase());
      }
      return myPluginNameArray.join('');
  };
  