https://github.com/blakeembrey/universal-base64
Small universal base64 functions for node.js and browsers
https://github.com/blakeembrey/universal-base64
base64 decoding encoding typescript universal
Last synced: 3 months ago
JSON representation
Small universal base64 functions for node.js and browsers
- Host: GitHub
- URL: https://github.com/blakeembrey/universal-base64
- Owner: blakeembrey
- License: other
- Created: 2018-05-20T07:10:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:48:29.000Z (over 1 year ago)
- Last Synced: 2025-04-14T19:09:11.892Z (3 months ago)
- Topics: base64, decoding, encoding, typescript, universal
- Language: TypeScript
- Size: 1.35 MB
- Stars: 29
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Universal Base64
[](https://npmjs.org/package/universal-base64)
[](https://npmjs.org/package/universal-base64)
[](https://travis-ci.org/blakeembrey/universal-base64)
[](https://coveralls.io/r/blakeembrey/universal-base64?branch=master)
[](https://bundlephobia.com/result?p=universal-base64)> Small universal base64 functions for node.js and browsers.
Why? Universal projects deployed to browsers should not need `Buffer` for base64 functionality already built into browsers (`window.btoa` and `window.atob`).
## Installation
```
npm install universal-base64 --save
```## Usage
```js
import { decode, encode } from "universal-base64";encode("test"); //=> "dGVzdA=="
decode("dGVzdA=="); //=> "test"
```## TypeScript
This module uses [TypeScript](https://github.com/Microsoft/TypeScript) and contains type definitions on NPM.
## License
Apache 2.0