nope/lib/helpers/idMethods.ts

16 lines
326 B
TypeScript
Raw Normal View History

2020-11-06 08:10:30 +00:00
/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
* @create date 2020-11-06 08:53:48
* @modify date 2020-11-06 08:53:48
* @desc [description]
*/
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();
}