Skip to content
Myr

nanoid.js

This file

Path

nanoid.js

1 line · 189 bytes · JavaScript

Last changed by

Reduce Nano ID size to 117 bytes (#613)Alexander Bayandinbefore adoption05057d8

History of this file

Take it

Reduce Nano ID size to 117 bytes (#613)Alexander Bayandinbefore adoption05057d8

line 1why, one step back
1let a="57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9";export let nanoid=(r=21)=>{for(var e="",t=crypto.getRandomValues(new Uint8Array(r|=0));r--;)e+=a[63&t[r]];return e};