SponsorBlockServer/test/utils/getRandom.ts
2023-02-21 03:24:07 -05:00

3 lines
117 B
TypeScript

import crypto from "crypto";
export const genRandom = (bytes=8) => crypto.pseudoRandomBytes(bytes).toString("hex");