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

Function arrayMapN

components/dash-table/src/core/math/arrayZipMap.ts:49–65  ·  view source on GitHub ↗
(
    fn: (i: number, ...args: any[]) => TR,
    ...arrays: any[][]
)

Source from the content-addressed store, hash-verified

47}
48
49export function arrayMapN<TR>(
50 fn: (i: number, ...args: any[]) => TR,
51 ...arrays: any[][]
52) {
53 const a1 = arrays.slice(0, 1);
54 const as = arrays.slice(1);
55
56 const _a1_ = a1.length;
57
58 const res: TR[] = new Array<TR>(_a1_);
59
60 for (let i = 0; i < _a1_; ++i) {
61 res[i] = fn(i, a1[i], ...as.map(a => a[i]));
62 }
63
64 return res;
65}

Callers

nothing calls this directly

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…