MCPcopy
hub / github.com/immutable-js/immutable-js / arrayOfSize

Function arrayOfSize

__tests__/Stack.ts:5–11  ·  view source on GitHub ↗
(s: number)

Source from the content-addressed store, hash-verified

3import { Seq, Stack } from 'immutable';
4
5function arrayOfSize(s: number): Array<number> {
6 const a = new Array(s);
7 for (let ii = 0; ii < s; ii++) {
8 a[ii] = ii;
9 }
10 return a;
11}
12
13describe('Stack', () => {
14 it('constructor provides initial values', () => {

Callers 1

Stack.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected