MCPcopy Index your code
hub / github.com/socketio/socket.io / toArray

Function toArray

client-dist/socket.io.js:321–329  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

319 return fileReader.readAsDataURL(data);
320 };
321 function toArray(data) {
322 if (data instanceof Uint8Array) {
323 return data;
324 } else if (data instanceof ArrayBuffer) {
325 return new Uint8Array(data);
326 } else {
327 return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
328 }
329 }
330 var TEXT_ENCODER;
331 function encodePacketToBinary(packet, callback) {
332 if (withNativeBlob$1 && packet.data instanceof Blob) {

Callers 1

encodePacketToBinaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected