This commit is contained in:
syuilo 2019-04-14 02:36:00 +09:00
parent a2fcae4383
commit f46f53b8a3
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 2 additions and 2 deletions

View File

@ -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();
} }