MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / blitBuffer

Function blitBuffer

app/public/socketcluster-client.js:4373–4379  ·  view source on GitHub ↗
(src, dst, offset, length)

Source from the content-addressed store, hash-verified

4371}
4372
4373function blitBuffer (src, dst, offset, length) {
4374 for (var i = 0; i < length; ++i) {
4375 if ((i + offset >= dst.length) || (i >= src.length)) break
4376 dst[i + offset] = src[i]
4377 }
4378 return i
4379}
4380
4381// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
4382// the `instanceof` check but they should be treated as of that type.

Callers 4

utf8WriteFunction · 0.85
asciiWriteFunction · 0.85
base64WriteFunction · 0.85
ucs2WriteFunction · 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…