"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.updateArrayWithDefault = updateArrayWithDefault;

function updateArrayWithDefault(array, defaultoptions = []) {
  const index = array.indexOf('...');

  if (index === -1) {
    return array;
  }

  const newArray = [...array];
  newArray.splice(index, 1, ...defaultoptions);
  return newArray;
}