MCPcopy Index your code
hub / github.com/nodejs/node / fromObject

Function fromObject

lib/buffer.js:570–581  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

568}
569
570function fromObject(obj) {
571 if (obj.length !== undefined || isAnyArrayBuffer(obj.buffer)) {
572 if (typeof obj.length !== 'number') {
573 return new FastBuffer();
574 }
575 return fromArrayLike(obj);
576 }
577
578 if (obj.type === 'Buffer' && ArrayIsArray(obj.data)) {
579 return fromArrayLike(obj.data);
580 }
581}
582
583// Static methods
584

Callers 1

buffer.jsFile · 0.85

Calls 1

fromArrayLikeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…