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

x/simple_utility/src/pure/base64.ts>b64DataURL

Simplify processing for Deno.
Go to Latest
function b64DataURL
import { b64DataURL } from "https://deno.land/x/simple_utility@v2.0.9/src/pure/base64.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
type: string

Returns

string