lesca-atobtoa
v1.1.3
Published
encode / decode data to base64
Downloads
6
Maintainers
Readme
Why use it?
It's increase charCode in special number. It's not easy to decode.
Live Demo
Installation
npm install lesca-atobtoa --save
Usage
As a Node module:
import Atobtoa from 'lesca-atobtoa';
const Data = { name: 'james', age: '18' };
const base64 = Atobtoa.toBase64(Data);
console.log(base64); //JTI1NUIlMjU3QiUyNTIybmFtZSUyNTIyJTI1M0ElMjUyMmphbWVzJTI1MjIlMjUyQyUyNTIyYWdlJTI1MjIlMjUzQTE4JTI1N0QlMjU1RA==
console.log(Atobtoa.toJson(base64)); //[{ name: 'james', age: 18 }]
Development
Methods
| method | description | default | return | | :----------------------------------------------- | :------------: | -------: | -----: | | .toBase64(JSON:object, push:int) | json to base64 | push = 1 | base64 | | .toJson(base64:string, push:int) | base64 to json | push = 1 | json |
Features
- maintain if necessary