MCPcopy
hub / github.com/feross/buffer / fromArrayLike

Function fromArrayLike

index.js:256–263  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

254}
255
256function fromArrayLike (array) {
257 const length = array.length < 0 ? 0 : checked(array.length) | 0
258 const buf = createBuffer(length)
259 for (let i = 0; i < length; i += 1) {
260 buf[i] = array[i] & 255
261 }
262 return buf
263}
264
265function fromArrayView (arrayView) {
266 if (isInstance(arrayView, Uint8Array)) {

Callers 2

fromArrayViewFunction · 0.85
fromObjectFunction · 0.85

Calls 2

checkedFunction · 0.85
createBufferFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…