@darkwolf/base64url.cjs
v1.0.1
Published
Base64URL
Downloads
7
Maintainers
Readme
Base64URL
Install
ECMAScript (Node.js v12.x LTS or higher)
npm i --save @darkwolf/base64url.mjs
CommonJS (Node.js v10.x LTS or higher)
npm i --save @darkwolf/base64url.cjs
Using
// ECMAScript
import Base64URL from '@darkwolf/base64url.mjs'
// CommonJS
const Base64URL = require('@darkwolf/base64url.cjs')
const encoded = Base64URL.encode('Ave, Darkwolf!') // () => 'QXZlLCBEYXJrd29sZiE'
Base64URL.decode(encoded) // () => 'Ave, Darkwolf!'