UNPKG

520 BTypeScriptView Raw
1/**
2 * @name arrayRange
3 * @summary Returns a range of numbers ith the size and the specified offset
4 * @description
5 * Returns a new array of numbers with the specific size. Optionally, when `startAt`, is provided, it generates the range to start at a specific value.
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { arrayRange } from '@polkadot/util';
11 *
12 * arrayRange(5); // [0, 1, 2, 3, 4]
13 * arrayRange(3, 5); // [5, 6, 7]
14 * ```
15 */
16export declare function arrayRange(size: number, startAt?: number): number[];