mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at thread-bug 8 lines 197 B view raw
1import {randomBytes} from 'node:crypto' 2 3import {toString} from 'uint8arrays' 4 5// 40bit random id of 5-7 characters 6export const randomId = () => { 7 return toString(randomBytes(5), 'base58btc') 8}