source: node_modules/es-toolkit/dist/array/pull.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 615 bytes
Line 
1/**
2 * Removes all specified values from an array.
3 *
4 * This function changes `arr` in place.
5 * If you want to remove values without modifying the original array, use `difference`.
6 *
7 * @template T, U
8 * @param {T[]} arr - The array to modify.
9 * @param {unknown[]} valuesToRemove - The values to remove from the array.
10 * @returns {T[]} The modified array with the specified values removed.
11 *
12 * @example
13 * const numbers = [1, 2, 3, 4, 5, 2, 4];
14 * pull(numbers, [2, 4]);
15 * console.log(numbers); // [1, 3, 5]
16 */
17declare function pull<T>(arr: T[], valuesToRemove: readonly unknown[]): T[];
18
19export { pull };
Note: See TracBrowser for help on using the repository browser.