How to use the base64-js.byteLength function in base64-js

To help you get started, we’ve selected a few base64-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / base64-js / base64-js-tests.ts View on Github external
import * as base64js from "base64-js";

base64js.byteLength(""); // $ExpectType number
base64js.toByteArray(""); // $ExpectType Uint8Array
base64js.fromByteArray(new Uint8Array(0)); // $ExpectType string
github DefinitelyTyped / DefinitelyTyped / base64-js / base64-js-tests.ts View on Github external
import * as base64js from "base64-js";

const length: number = base64js.byteLength("");
const bytes: Uint8Array = base64js.toByteArray("");
const decoded: string = base64js.fromByteArray(new Uint8Array(0));

base64-js

Base64 encoding/decoding in pure JS

MIT
Latest version published 4 years ago

Package Health Score

74 / 100
Full package analysis