@borderless/base64
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Base64

NPM version NPM downloads Build status Test coverage

Base64 encoding and decoding for ArrayBuffer.

Installation

npm install @borderless/base64 --save

Usage

import { encode, encodeUrl, decode } from "@borderless/base64";

expect(encode(new TextEncoder().encode("hello"))).toEqual("aGVsbG8=");
expect(encode(new TextEncoder().encode("你好"))).toEqual("5L2g5aW9");

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

MIT

Originally based on base64-arraybuffer, enhanced using TypeScript, ESM and support for Base64URL.

Package Sidebar

Install

npm i @borderless/base64

Weekly Downloads

91

Version

1.0.1

License

MIT

Unpacked Size

34 kB

Total Files

13

Last publish

Collaborators

  • blakeembrey