8 lines
164 B
TypeScript
8 lines
164 B
TypeScript
import { v4 } from 'uuid';
|
|
|
|
export function generateId(prestring?: string) {
|
|
if (typeof prestring === 'string') {
|
|
return prestring + v4()
|
|
}
|
|
return v4();
|
|
} |