@micheledef/base64_encode_decode
v1.0.3
Published
base64_encode and base64_decode with node js
Downloads
4
Maintainers
Readme
base64_encode_decode
base64_encode and base64_decode with node js
Install package with npm
npm i @micheledef/base64_encode_decode
Usage
CommonJS syntax
const {base64_encode, base64_decode} = require('@micheledef/base64_encode_decode');
let data = "Hello World";
let encode = base64_encode(data);
console.log(encode);
//output SGVsbG8gV29ybGQ=
let decode = base64_decode(encode);
console.log(decode);
//output Hello World
Module syntax
import { base64_encode, base64_decode } from '@micheledef/base64_encode_decode';
let data = 'Hello World';
let encode = base64_encode(data);
console.log(encode);
//output SGVsbG8gV29ybGQ=
let decode = base64_decode(encode);
console.log(decode);
//output Hello World