source: node_modules/es-toolkit/dist/array/drop.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: 789 bytes
Line 
1/**
2 * Removes a specified number of elements from the beginning of an array and returns the rest.
3 *
4 * This function takes an array and a number, and returns a new array with the specified number
5 * of elements removed from the start.
6 *
7 * @template T - The type of elements in the array.
8 * @param {T[]} arr - The array from which to drop elements.
9 * @param {number} itemsCount - The number of elements to drop from the beginning of the array.
10 * @returns {T[]} A new array with the specified number of elements removed from the start.
11 *
12 * @example
13 * const array = [1, 2, 3, 4, 5];
14 * const result = drop(array, 2);
15 * // result will be [3, 4, 5] since the first two elements are dropped.
16 */
17declare function drop<T>(arr: readonly T[], itemsCount: number): T[];
18
19export { drop };
Note: See TracBrowser for help on using the repository browser.