nope/lib/helpers/idMethods.ts

8 lines
164 B
TypeScript
Raw Normal View History

2020-08-25 22:11:26 +00:00
import { v4 } from 'uuid';
2020-09-08 14:59:06 +00:00
export function generateId(prestring?: string) {
if (typeof prestring === 'string') {
return prestring + v4()
}
2020-08-25 22:11:26 +00:00
return v4();
}