Simple utility for converting between base36 strings and buffers
npm install b36Simple utility for converting between base36 strings and buffers
Base36 is slightly more compact than hex encoding, but is still safe to use
for things like hostnames.
``js
const { encode } = require('b36')
let key = require('crypto').randomBytes(32)
console.log(encode(key))
// Sample output:
// 2jn5z3wzqnt6adgw7dwo98krsz6pku9cckb0cizs34pv025lpf
`
`js``
const { decode } = require('b36')
let str = '2jn5z3wzqnt6adgw7dwo98krsz6pku9cckb0cizs34pv025lpf'
console.log(decode(str))
// Sample output:
//