source: node_modules/es-toolkit/dist/compat/math/rangeRight.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: 1.2 KB
RevLine 
[a762898]1/**
2 * Creates an array of numbers from `start` to `end` with optional `step`.
3 * @param {number} start - The starting number of the range (inclusive).
4 * @param {number} [end] - The end number of the range (exclusive).
5 * @param {number} [step] - The step value for the range.
6 * @returns {number[]} An array of numbers from `start` to `end` with the specified `step`.
7 * @example
8 * // Returns [0, 1, 2, 3]
9 * rangeRight(4);
10 * @example
11 * // Returns [0, 2, 4, 6]
12 * rangeRight(0, 8, 2);
13 * @example
14 * // Returns [5, 4, 3, 2, 1]
15 * rangeRight(1, 6);
16 */
17declare function rangeRight(start: number, end?: number, step?: number): number[];
18/**
19 * Creates an array of numbers from 0 to `end` with step 1.
20 * Used when called as an iteratee for methods like `_.map`.
21 * @param {number} end - The end number of the range (exclusive).
22 * @param {string | number} index - The index parameter (used for iteratee calls).
23 * @param {object} guard - The guard parameter (used for iteratee calls).
24 * @returns {number[]} An array of numbers from 0 to `end` with step 1.
25 * @example
26 * // Returns [0, 1, 2, 3]
27 * rangeRight(4, 'index', {});
28 */
29declare function rangeRight(end: number, index: string | number, guard: object): number[];
30
31export { rangeRight };
Note: See TracBrowser for help on using the repository browser.