UNPKG

@ethicdevs/react-global-state-hooks-debugger

Version:

A small websocket based debugger for use with the react-global-state-hooks library

13 lines (10 loc) 302 B
export type ProtocolPacket = [string, number, string]; export enum ProtocolPacketKind { Unknown, Attach = 'attach', Dettach = 'dettach', Tail = 'tail', } export function serializePacket(packet: ProtocolPacket): string { return `{"_k":"${packet[0]}","_t":${packet[1]},"_d":${packet[2]}}`; }