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

Function shallowClone

components/dash-table/src/core/math/matrixZipMap.ts:3–13  ·  view source on GitHub ↗
(m: Matrix<T>)

Source from the content-addressed store, hash-verified

1type Matrix<T> = T[][];
2
3export function shallowClone<T>(m: Matrix<T>): Matrix<T> {
4 const _m_ = m.length;
5
6 const res: Matrix<T> = new Array<T[]>(_m_);
7
8 for (let i = 0; i < _m_; ++i) {
9 res[i] = m[i].slice(0);
10 }
11
12 return res;
13}
14
15export function traverse2<T1, T2>(
16 a1: T1[],

Callers 4

constructorMethod · 0.90
WrappersClass · 0.90
ContentsClass · 0.90
getterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…