mirror of
https://github.com/obsidian-desci/Obsidian-Desci.git
synced 2026-07-22 08:50:32 +00:00
10 lines
No EOL
225 B
TypeScript
10 lines
No EOL
225 B
TypeScript
/**
|
|
* Generate a string of random hexadecimal chars
|
|
*/
|
|
export const randomHexString = (len: number) => {
|
|
const t = []
|
|
for (let n = 0; n < len; n++) {
|
|
t.push((16 * Math.random() | 0).toString(16))
|
|
}
|
|
return t.join("")
|
|
} |