Initial Commit
This commit is contained in:
9
src/utils/id.ts
Normal file
9
src/utils/id.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { init } from "@paralleldrive/cuid2";
|
||||
|
||||
const id = init({
|
||||
length: 15,
|
||||
});
|
||||
|
||||
export function generateId(perfix?: string) {
|
||||
return perfix ? perfix + id() : id();
|
||||
}
|
||||
Reference in New Issue
Block a user