Skip to content

herber/encoded

Repository files navigation

encoded Codestyle fyi Build Status Build status Coverage 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

Releases

No releases published

Packages

No packages published