MCPcopy Index your code
hub / github.com/feross/buffer / blitBuffer

Function blitBuffer

index.js:2063–2070  ·  view source on GitHub ↗
(src, dst, offset, length)

Source from the content-addressed store, hash-verified

2061}
2062
2063function blitBuffer (src, dst, offset, length) {
2064 let i
2065 for (i = 0; i < length; ++i) {
2066 if ((i + offset >= dst.length) || (i >= src.length)) break
2067 dst[i + offset] = src[i]
2068 }
2069 return i
2070}
2071
2072// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
2073// 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…