{"version":3,"file":"remove.cjs","names":[],"sources":["../../src/array/remove.ts"],"sourcesContent":["/**\n * Returns items that match the predicate without mutating the input\n * @param array The array to filter\n * @param predicate The function to test each element\n * @returns A new array of matching (removed) elements\n * @example\n * const arr = [1, 2, 3, 4, 5];\n * remove(arr, (item) => item > 3); // [4, 5]\n * // arr is still [1, 2, 3, 4, 5]\n */\nexport function remove<T>(array: readonly T[], predicate: (item: T, index: number) => boolean): T[] {\n  if (!Array.isArray(array)) {\n    return [];\n  }\n  return array.filter((item, index) => predicate(item, index));\n}\n"],"mappings":";;;;;;;;;;;;AAUA,SAAgB,OAAU,OAAqB,WAAqD;CAClG,IAAI,CAAC,MAAM,QAAQ,KAAK,GACtB,OAAO,CAAC;CAEV,OAAO,MAAM,QAAQ,MAAM,UAAU,UAAU,MAAM,KAAK,CAAC;AAC7D"}