Skip to content

Instantly share code, notes, and snippets.

@bgrins
Created November 22, 2022 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgrins/c46397e07431d6199d2c573165ddda6c to your computer and use it in GitHub Desktop.
Save bgrins/c46397e07431d6199d2c573165ddda6c to your computer and use it in GitHub Desktop.
deno eval 'let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"");console.log(nanoid())'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment