1.0.4 • Published 3 years ago

@prashoonb/base64-encoder-decoder v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@prashoonb/base64-encoder-decoder

Installation

npm install @prashoonb/base64-encoder-decoder

API

base64.encode(input)

This function takes a byte string (the input parameter) and encodes it according to base64.

const base64 = require("@prashoonb/base64-encoder-decoder");

const text = "foo © bar 𝌆 baz";
const encoded = base64.encode(bytes);
console.log(encoded);
// → "Zm9vIMKpIGJhciDwnYyGIGJheg=="

base64.decode(input)

This function takes a base64-encoded string (the input parameter) and decodes it.

const encoded = "Zm9vIMKpIGJhciDwnYyGIGJheg==";
const text = base64.decode(bytes);
console.log(text);
// → "foo © bar 𝌆 baz"

Author

twitter/prashoonb
Prashoon Bhattacharjee

License

@prashoonb/base64-encoder-decoder is available under the MIT license.

Credits

Inspired by Mathias Bynens' base64 package.

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago