Skip to content
base64 strings from/to Uint8Arrays
Branch: master
Clone or download
Latest commit fd28ee3 Mar 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.appveyor.yml buf 2 base64 and back Mar 30, 2019
.travis.yml buf 2 base64 and back Mar 30, 2019
LICENSE buf 2 base64 and back Mar 30, 2019
README.md
mod.ts rename Mar 30, 2019
test.ts rename Mar 30, 2019

README.md

base64

Travis AppVeyor

base64 strings from/to Uint8Arrays

Import

import * as base64 from "https://denopkg.com/chiefbiiko/base64/mod.ts";

Usage

import * as base64 from "https://denopkg.com/chiefbiiko/base64/mod.ts";

const b64: string = base64.fromUint8Array(new TextEncoder().encode("this is too much"));
const buf: Uint8Array = base64.toUint8Array(b64);

API

base64.fromUint8Array(buf: Uint8Array): string

Transcode a base64 string from a byte array.

base64.toUint8Array(b64: string): Uint8Array

Turn a base64 string to a byte array.

base64.byteLength(b64: string): number

Calculate the byte length of a base64 string.

License

MIT

You can’t perform that action at this time.