Package Exports
- b64ab
- b64ab/b64ab.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (b64ab) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
b64ab
install
npm install b64ab
usage
import { toBase64String, toArrayBuffer } from "b64ab";
// create an Array Buffer
const ab = Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).buffer;
// convert an Array Buffer to a Base-64 String
toBase64String(ab);
"AQIDBAUGBwgJCg=="
// convert a Base-64 String to an Array Buffer
toArrayBuffer("AQIDBAUGBwgJCg==")
ArrayBuffer {
[Uint8Contents]: <01 02 03 04 05 06 07 08 09 0a>,
byteLength: 10
}