MCPcopy Index your code
hub / github.com/apache/echarts / cloneChunk

Function cloneChunk

src/data/DataStore.ts:124–130  ·  view source on GitHub ↗
(originalChunk: DataValueChunk)

Source from the content-addressed store, hash-verified

122};
123
124function cloneChunk(originalChunk: DataValueChunk): DataValueChunk {
125 const Ctor = originalChunk.constructor;
126 // Only shallow clone is enough when Array.
127 return Ctor === Array
128 ? (originalChunk as Array<ParsedValue>).slice()
129 : new (Ctor as DataTypedArrayConstructor)(originalChunk as DataTypedArray);
130}
131
132function prepareStore(
133 store: DataValueChunk[],

Callers 1

cloneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…