repo.or.cz
/
ProtonMail-WebClient.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[DRVWEB-4373] Add Suggestion Mode spotlight onboarding modal for docs on drive
[ProtonMail-WebClient.git]
/
packages
/
pass
/
utils
/
string
/
unique-id.ts
blob
b527521872b027c99396bd837ea8331f5d43eba1
1
export const uniqueId = (length: number = 8): string =>
2
Array.from(crypto.getRandomValues(new Uint8Array(length)))
3
.map((b) => b.toString(16))
4
.join('')
5
.slice(0, length);