0.1.1 • Published 12 months ago

@tunebond/form-code v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

@tunebond/form-code

Generate pseudorandom keys and such for DB IDs or whatever else IDs. Not secure, it's not supposed to be secure, just here to make it appear non-sequential to the average person :).

pnpm add @tunebond/form-code
yarn add @tunebond/form-code
npm i @tunebond/form-code

Example

import { make4, make32 } from '@tunebond/form-code'

console.log(make4(256n)) // => MHZL
console.log(make32(256n)) // => ZFHDWMVBWWZXKZKTFSTVFHXNWWDVVKCM