MCPcopy Create free account
hub / github.com/WICG/webpackage / bytestringToString

Function bytestringToString

js/bundle/src/decoder.ts:274–279  ·  view source on GitHub ↗
(bstr: unknown)

Source from the content-addressed store, hash-verified

272}
273
274function bytestringToString(bstr: unknown): string {
275 if (!(bstr instanceof Uint8Array)) {
276 throw new Error('Bytestring expected');
277 }
278 return new TextDecoder('utf-8').decode(bstr);
279}

Callers 2

constructorMethod · 0.85
decodeResponseMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected