GitHub 6219★

Generate a random string using Node crypto module

JavaScript version

const randomStr = () => require('crypto').randomBytes(32).toString('hex');

TypeScript version

const randomStr = (): string => require('crypto').randomBytes(32).toString('hex');
Follow me on and to get more useful contents.