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

Function decode

src/ext/eventsource.js:358–363  ·  view source on GitHub ↗
(data, encoding)

Source from the content-addressed store, hash-verified

356}
357
358function decode(data, encoding) {
359 if (encoding.toLowerCase() === "json") {
360 return JSON.parse(data);
361 }
362 return data;
363}
364
365// ========================================
366// STREAM CONVERSION (fetch ... as Stream)

Callers 1

makeHandlerFunction · 0.70

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected