MCPcopy Create free account
hub / github.com/nodejs/node / toBuffer

Function toBuffer

deps/undici/undici.js:15825–15834  ·  view source on GitHub ↗
(data, hint)

Source from the content-addressed store, hash-verified

15823 }
15824 __name(createFrame, "createFrame");
15825 function toBuffer(data, hint) {
15826 switch (hint) {
15827 case sendHints.text:
15828 case sendHints.typedArray:
15829 return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
15830 case sendHints.arrayBuffer:
15831 case sendHints.blob:
15832 return new Uint8Array(data);
15833 }
15834 }
15835 __name(toBuffer, "toBuffer");
15836 module2.exports = { SendQueue };
15837 }

Callers 2

createFrameFunction · 0.70
exportStringFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected