forked from FoundKeyGang/FoundKey
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');
|
return time.toString(36).padStart(8, '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRandom() {
|
function getNoise() {
|
||||||
return counter.toString(36).padStart(2, '0').slice(-2);
|
return counter.toString(36).padStart(2, '0').slice(-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function genAid(date: Date): string {
|
export function genAid(date: Date): string {
|
||||||
counter++;
|
counter++;
|
||||||
return getTime(date.getTime()) + getRandom();
|
return getTime(date.getTime()) + getNoise();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue