MCPcopy Index your code
hub / github.com/plotly/dash / arrayMap2

Function arrayMap2

components/dash-table/src/core/math/arrayZipMap.ts:16–30  ·  view source on GitHub ↗
(
    a1: T1[],
    a2: T2[],
    fn: (d1: T1, d2: T2, i: number) => TR
)

Source from the content-addressed store, hash-verified

14}
15
16export function arrayMap2<T1, T2, TR>(
17 a1: T1[],
18 a2: T2[],
19 fn: (d1: T1, d2: T2, i: number) => TR
20): TR[] {
21 const _a1_ = a1.length;
22
23 const res: TR[] = new Array<TR>(_a1_);
24
25 for (let i = 0; i < _a1_; ++i) {
26 res[i] = fn(a1[i], a2[i], i);
27 }
28
29 return res;
30}
31
32export function arrayMap3<T1, T2, T3, TR>(
33 a1: T1[],

Callers 3

FilterFactoryClass · 0.90
CellFactoryClass · 0.90
HeaderFactoryClass · 0.90

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…