(
fn: (i: number, ...args: any[]) => TR,
...arrays: any[][]
)
| 47 | } |
| 48 | |
| 49 | export 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…