Skip to content

Encode and decode a object without stringify / parsing the data

License

Notifications You must be signed in to change notification settings

entwicklerstube/base64object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base64object

Encode and decode objects without stringify / parseing the data in browser / node

Zero Dependencies Build Status devDependencies Status

Install

npm

npm install base64object

yarn

yarn add base64object

Usage

base64object.encode({ hello: 'world' })
// response eyJoZWxsbyI6IndvcmxkIn0=

base64object.decode('eyJoZWxsbyI6IndvcmxkIn0=')
// response { hello: 'world' }

Support

Browser Under the hood it uses the window.atob() native feature which is supported in each major browser and IE from version 10 (check mozilla dev site)

Node Uses the native Buffer API from node (check node documentation)

About

Encode and decode a object without stringify / parsing the data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published