5 lines
155 B
TypeScript
5 lines
155 B
TypeScript
|
import { randomBytes } from "crypto";
|
||
|
|
||
|
export function randomString(length: number) {
|
||
|
return randomBytes(length).toString("base64").slice(0, length);
|
||
|
}
|