Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/simple_utility/mod.ts>b64DataURL

Useful snippet collection.
Go to Latest
function b64DataURL
import { b64DataURL } from "https://deno.land/x/simple_utility@v1.5.2/mod.ts";

Convert from binary to base64 encoded DataURL. Default MIME type is application/octet-stream.

Examples

Example 1

const bin = await Deno.readFile("./file");
const data = b64DataURL(bin);

Parameters

data: Uint8Array
optional
mime: string

Returns

string