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

https://github.com/rocktimsaikia/node-encoder

A zero dependency base64 encoder and decoder for Node.js
https://github.com/rocktimsaikia/node-encoder

base64encoder decoder encoder encoder-decoder node-encoder

Last synced: 11 months ago
JSON representation

A zero dependency base64 encoder and decoder for Node.js

Awesome Lists containing this project

README

          

# node-encoder [![Actions Status](https://github.com/rocktimsaikia/node-encoder/workflows/build/badge.svg)](https://github.com/rocktimsaikia/node-encoder/actions)

> A zero dependency :tada: base64 encoder and decoder for Node.js.

## Installation
```bash
npm install node-encoder
```

## Highlights
- Zero dependencies 🎉
- Lightweight (`~4kb`) 🚀

## Usage

```js
const {encode, decode} = require('node-encoder')

encode('hello world!') //=> aGVsbG8gd29ybGQh

decode('aGVsbG8gd29ybGQh') //=> hello world!
```

## API

### `encode(input)`

Takes a single `utf-8/ascii` string input as argument and retuns it's `base64` encoded string version.

### `decode(input)`

Takes a single `base64` string input as argument and retuns it's `utf-8` decoded string version.

## License
MIT 2021 © [Rocktim Saikia](https://rocktimsaikia.now.sh)