@ethicdevs/react-global-state-hooks-debugger
Version:
A small websocket based debugger for use with the react-global-state-hooks library
15 lines (14 loc) • 643 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializePacket = exports.ProtocolPacketKind = void 0;
var ProtocolPacketKind;
(function (ProtocolPacketKind) {
ProtocolPacketKind[ProtocolPacketKind["Unknown"] = 0] = "Unknown";
ProtocolPacketKind["Attach"] = "attach";
ProtocolPacketKind["Dettach"] = "dettach";
ProtocolPacketKind["Tail"] = "tail";
})(ProtocolPacketKind = exports.ProtocolPacketKind || (exports.ProtocolPacketKind = {}));
function serializePacket(packet) {
return `{"_k":"${packet[0]}","_t":${packet[1]},"_d":${packet[2]}}`;
}
exports.serializePacket = serializePacket;