encoded

1.0.0 • Public • Published

encoded Codestyle fyi Build Status Build status

Encode things

Install

$ npm install --save encoded

Usage

const encoded = require('encoded');
 
encoded.encode('unicorns');
//=> 'dW5pY29ucw=='
 
encoded.decode('cmFpbmJvd3M=');
//=> 'rainbows'

API

encoded.encode(input, [type])

input

Type: any

The data you want to encode.

type

Type: string
Default: base64

How you want the data to be encoded.

encoded.encode(input, [type])

input

Type: string

An encoded string.

type

Type: string
Default: base64

How the string is encoded.

to

Type: string
Default: ascii

What you want to get back.

License

MIT © Tobias Herber

Package Sidebar

Install

npm i encoded

Weekly Downloads

10

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tobihrbr