(length: number = 16)
| 1 | import { randomBytes } from 'crypto'; |
| 2 | |
| 3 | export function generateToken(length: number = 16): string { |
| 4 | return ( |
| 5 | randomBytes(length).toString('hex') + |
| 6 | Math.random().toString(length).substr(2) |
| 7 | ); |
| 8 | } |
no outgoing calls
no test coverage detected