base45-mjs
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

base45-mjs

Simple and fast base45 implementation with TS, mjs, cjs and tree shaking

Install

npm i base45-mjs

Usage

// cjs
const { encode, decode } = require('base45-mjs')

console.log(encode('Hello!'))
console.log(decode(encode('Hello!')).toString())
// mjs
import { encode, decode } from 'base45-mjs'

console.log(encode('Hello!'))
console.log(decode(encode('Hello!')).toString())

Browser

ESM

<script type="module">
import { encode, decode } from 'https://unpkg.com/base45-mjs/dist/index.browser.mjs'

console.log(encode('Hello!'))
console.log(decode(encode('Hello!')).toString())
</script>

unpkg

<script type="application/javascript" src="https://unpkg.com/base45-mjs"></script>
<script>
    console.log(base45.encode('Hello!'))
    console.log(base45.decode(base45.encode('Hello!')).toString())
</script>

jsdelivr

<script type="application/javascript" src="https://cdn.jsdelivr.net/npm/base45-mjs"></script>
<script>
    console.log(base45.encode('Hello!'))
    console.log(base45.decode(base45.encode('Hello!')).toString())
</script>

Readme

Keywords

Package Sidebar

Install

npm i base45-mjs

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

57.8 kB

Total Files

8

Last publish

Collaborators

  • mav-rik