1.0.8 ā¢ Published 5 years ago
encode-case64 v1.0.8
encode-case64 š
simple string base64 encoder module for node.js.
Install
$ npm install encode-case64 --save
Usage
// commonjs style
require('encode-case64');
// es6 style
import "encode-case64";
const str = "Your String."
encode/decode string to upper/lower case with base64
ā” encrypt to Lowercase: š
const encodedLower = str.encodeToLowerCase();
output : "-w-w91ci-b-td-h-jpbmcu"
ā” encrypt to Uppercase: š
const encodedUpper = str.encodeToUpperCase();
output : "WW91-C-IBT-DHJ-P-B-M-C-U"
ā” decrypt from Lowercase/Uppercase: š
const your-original-string = encodedUpper.decodeFromCase64();
output : "Your String."
convert/de-convert string to upper/lower case (without encoding)
ā” convert to Lowercase: š
const lowerStr = str.convertToLowerCase();
output : "-your -string."
ā” convert to Uppercase: š
const upperStr = str.convertToUpperCase();
output : "Y-O-U-R S-T-R-I-N-G."
ā” convert from Lowercase/Uppercase: š
const your-original-string = upperStr.convertFromCase64();
output : "Your String."
Test
To run the test suite, first install the dependencies, then run npm test:
$ npm install
$ npm test