MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / stringAsBase64

Function stringAsBase64

test/injected/gm-resource.test.js:4–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import { decodeResource } from '@/injected/content/util';
3
4const stringAsBase64 = str => btoa(buffer2string(new TextEncoder().encode(str).buffer));
5
6const blobAsText = async blob => new TextDecoder().decode(await readBlob(blob, true));
7

Callers 1

Calls 1

buffer2stringFunction · 0.90

Tested by

no test coverage detected