An open API service indexing awesome lists of open source software.

https://github.com/streamich/uint8-to-b64

Isomorphic Uint8Array conversion to Base64 string and back for browser and Node.js
https://github.com/streamich/uint8-to-b64

Last synced: 11 months ago
JSON representation

Isomorphic Uint8Array conversion to Base64 string and back for browser and Node.js

Awesome Lists containing this project

README

          

# `ArrayBuffer` to Base64 string and back

Isomorphic helpers to encode and decode `Uint8Array` to Base64 string and back.
Works in browser and Node.js.

API:

```ts
encode(ab: Uint8Array): string;
decode(str: string): Uint8Array;
```

Contents:

- `index.js` — Node.js version
- `browser.js` — browser version