nope/lib/helpers/idMethods.ts
2020-09-08 16:59:06 +02:00

8 lines
164 B
TypeScript

import { v4 } from 'uuid';
export function generateId(prestring?: string) {
if (typeof prestring === 'string') {
return prestring + v4()
}
return v4();
}