MCPcopy
hub / github.com/socketio/socket.io / hasBinary

Function hasBinary

packages/engine.io/lib/parser-v3/index.ts:14–21  ·  view source on GitHub ↗
(packets)

Source from the content-addressed store, hash-verified

12export const protocol = 3;
13
14const hasBinary = (packets) => {
15 for (const packet of packets) {
16 if (packet.data instanceof ArrayBuffer || ArrayBuffer.isView(packet.data)) {
17 return true;
18 }
19 }
20 return false;
21}
22
23/**
24 * Packet types.

Callers 1

encodePayloadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected