mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-26 07:55:14 +00:00
Refactor
This commit is contained in:
parent
a2fcae4383
commit
f46f53b8a3
1 changed files with 2 additions and 2 deletions
|
@ -13,11 +13,11 @@ function getTime(time: number) {
|
|||
return time.toString(36).padStart(8, '0');
|
||||
}
|
||||
|
||||
function getRandom() {
|
||||
function getNoise() {
|
||||
return counter.toString(36).padStart(2, '0').slice(-2);
|
||||
}
|
||||
|
||||
export function genAid(date: Date): string {
|
||||
counter++;
|
||||
return getTime(date.getTime()) + getRandom();
|
||||
return getTime(date.getTime()) + getNoise();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue