{"version":3,"file":"removeAt.cjs","names":[],"sources":["../../src/array/removeAt.ts"],"sourcesContent":["/** The number of array items to remove. */\nexport interface RemoveAtOptions {\n  /** The number of items to remove. Defaults to `1`. */\n  count?: number;\n}\n\n/**\n * Removes items at the given index from the given array.\n *\n * @param {T[]} arr The source array.\n * @param {number} index The index to remove items from.\n * @param {RemoveAtOptions} options The number of items to remove.\n * @returns {T[]} A new array with the removed items.\n *\n * @example\n * removeAt([1, 2, 3], 1); //=> [1, 3]\n * removeAt([1, 2, 3, 4], 1, { count: 2 }); //=> [1, 4]\n */\n\nexport default function removeAt<T>(\n  arr: T[] = [],\n  index: number,\n  options?: RemoveAtOptions,\n): T[] {\n  const a = [...arr];\n  a.splice(index, options?.count ?? 1);\n  return a;\n}\n"],"mappings":"+FAmBA,SAAwB,EACtB,EAAW,CAAC,EACZ,EACA,EACK,CACL,IAAM,EAAI,CAAC,GAAG,CAAG,EAEjB,OADA,EAAE,OAAO,EAAO,GAAS,OAAS,CAAC,EAC5B,CACT"}