()
| 1 | import { nanoid } from 'nanoid/non-secure'; |
| 2 | |
| 3 | export function shortId() { |
| 4 | return nanoid(4); |
| 5 | } |
| 6 | |
| 7 | export function generateId(prefix?: string, length?: number) { |
| 8 | return prefix ? `${prefix}_${nanoid(length ?? 8)}` : nanoid(length ?? 8); |
no outgoing calls
no test coverage detected