Refactor
This commit is contained in:
parent
a2fcae4383
commit
f46f53b8a3
|
@ -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 New Issue