MCPcopy Create free account
hub / github.com/MathMan05/Fermi / decodeText

Method decodeText

src/webpage/media.ts:382–391  ·  view source on GitHub ↗
(buf: ArrayBuffer)

Source from the content-addressed store, hash-verified

380 output.img = {url, description};
381 }
382 function decodeText(buf: ArrayBuffer) {
383 let str = new TextDecoder().decode(buf);
384 if (str.startsWith("\u0000")) {
385 str = str.slice(1, str.length);
386 }
387 if (str.endsWith("\u0000")) {
388 str = str.slice(0, str.length - 1);
389 }
390 return str;
391 }
392 const mapmap = {
393 TT2: "title",
394 TP1: "artist",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected