MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / blobToBase64

Function blobToBase64

src/pkg/utils/utils.ts:371–379  ·  view source on GitHub ↗
(blob: Blob)

Source from the content-addressed store, hash-verified

369};
370
371export function blobToBase64(blob: Blob): Promise<string> {
372 return new Promise((resolve) => {
373 const reader = new FileReader();
374 reader.onloadend = function () {
375 resolve(<string>this.result);
376 };
377 reader.readAsDataURL(blob);
378 });
379}
380
381/*
382export function blobToText(blob: Blob): Promise<string | null> {

Callers 3

parseMethod · 0.90
importResourceMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected