list
Variable立即生成一个数字(或自定义值)组成的数组,用法和 `range` 一致,区别是直接返回数组而非生成器
Signature
const list: <T = number>(startOrLength: number, end?: number, valueOrMapper?: T | ((i: number) => T) | undefined, step?: number) => T[]Examples
list(0, 3) // [0, 1, 2, 3]
list(0, 6, (i) => i, 2) // [0, 2, 4, 6]Source
node_modules/.pnpm/radash@12.1.1/node_modules/radash/dist/index.d.ts:141