From f46f53b8a3c5c689694173a707dd3c1ec37169a8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 14 Apr 2019 02:36:00 +0900 Subject: [PATCH] Refactor --- src/misc/id/aid.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/id/aid.ts b/src/misc/id/aid.ts index 1fe15bf1ab..530d84e582 100644 --- a/src/misc/id/aid.ts +++ b/src/misc/id/aid.ts @@ -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(); }