ajout app
This commit is contained in:
10
Voltaserve/idp/src/infra/id.ts
Normal file
10
Voltaserve/idp/src/infra/id.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import hashids from 'hashids'
|
||||
|
||||
export function newHashId(): string {
|
||||
return new hashids(uuidv4()).encode(Date.now())
|
||||
}
|
||||
|
||||
export function newHyphenlessUuid(): string {
|
||||
return uuidv4().replaceAll('-', '')
|
||||
}
|
Reference in New Issue
Block a user