MCPcopy Index your code
hub / github.com/BlueWallet/BlueWallet / uint8ArrayToString

Function uint8ArrayToString

blue_modules/uint8array-extras/index.js:350–361  ·  view source on GitHub ↗
(input, encoding = 'utf8')

Source from the content-addressed store, hash-verified

348 * @returns {string}
349 */
350export function uint8ArrayToString(input, encoding = 'utf8') {
351 assertUint8ArrayOrArrayBuffer(input);
352
353 // Reject anything other than UTF-8
354 if (!/utf-?8/i.test(encoding)) {
355 throw new Error('Encoding "' + encoding + '" isn’t supported without a TextDecoder polyfill');
356 }
357
358 // Normalise to Uint8Array
359 const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
360 return decodeUtf8(bytes);
361}
362
363/**
364 * Minimal UTF-8 decoder

Callers 7

_onReadUniformResourceFunction · 0.90
bbqr.test.tsFile · 0.90
getUrlFromLnurlMethod · 0.90
setSecretMethod · 0.90
_readPsbtFileIntoBase64Function · 0.90
encodeURFunction · 0.90
toStringMethod · 0.90

Calls 2

decodeUtf8Function · 0.85

Tested by

no test coverage detected