@mike007jd/base64-converter
v1.0.0
Published
Fast Base64 encoder/decoder for web and Node.js
Downloads
43
Readme
@mike007jd/base64-converter
Fast Base64 encoder/decoder for web and Node.js.
Install
npm install @mike007jd/base64-converterUsage
import { encode, decode, isValid } from '@mike007jd/base64-converter';
// Encode
const encoded = encode('Hello World');
// SGVsbG8gV29ybGQ=
// Decode
const decoded = decode('SGVsbG8gV29ybGQ=');
// Hello World
// Validate
const valid = isValid('SGVsbG8gV29ybGQ=');
// trueAPI
encode(input: string): string- Encode string to Base64decode(input: string): string- Decode Base64 to stringisValid(input: string): boolean- Check if string is valid Base64encodeUrlSafe(input: string): string- URL-safe Base64 encodedecodeUrlSafe(input: string): string- URL-safe Base64 decode
License
MIT
