MCPcopy
hub / github.com/FormidableLabs/nuka-carousel / arraySeq

Function arraySeq

packages/nuka/src/utils/array.ts:7–9  ·  view source on GitHub ↗
(length: number, initialValue: number)

Source from the content-addressed store, hash-verified

5 * @returns An array of numbers
6 */
7export function arraySeq(length: number, initialValue: number): number[] {
8 return new Array(length).fill(0).map((_, i) => i * initialValue);
9}
10
11/**
12 * Creates an array where each element is the sum of all previous elements

Callers 2

useMeasurementFunction · 0.90
array.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected