MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / makeHandler

Function makeHandler

src/ext/eventsource.js:348–356  ·  view source on GitHub ↗
(encoding, commandList, stub, feature)

Source from the content-addressed store, hash-verified

346// ========================================
347
348function makeHandler(encoding, commandList, stub, feature) {
349 return function (evt) {
350 var data = decode(evt.data, encoding);
351 var context = feature.runtime.makeContext(stub, feature, stub);
352 context.event = evt;
353 context.result = data;
354 commandList.execute(context);
355 };
356}
357
358function decode(data, encoding) {
359 if (encoding.toLowerCase() === "json") {

Callers 1

parseMethod · 0.70

Calls 3

decodeFunction · 0.70
makeContextMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected