MCPcopy Index your code
hub / github.com/SocketCluster/socketcluster / cloneArrayBuffer

Function cloneArrayBuffer

app/public/socketcluster-client.js:7540–7544  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

7538}
7539
7540function cloneArrayBuffer(val) {
7541 const res = new val.constructor(val.byteLength);
7542 new Uint8Array(res).set(new Uint8Array(val));
7543 return res;
7544}
7545
7546function cloneTypedArray(val, deep) {
7547 return new val.constructor(val.buffer, val.byteOffset, val.length);

Callers 1

cloneFunction · 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…