This commit is contained in:
Acid Chicken (硫酸鶏) 2019-07-01 23:29:27 +09:00
parent f5972cabb3
commit 0c0281d51d
No known key found for this signature in database
GPG Key ID: 5388F56C75B677A1

View File

@ -5,12 +5,12 @@ import { genMeidg } from './id/meidg';
import { genObjectId } from './id/object-id';
import config from '../config';
const metohd = config.id.toLowerCase();
const method = config.id.toLowerCase();
export function genId(date?: Date): string {
if (!date || (date > new Date())) date = new Date();
switch (metohd) {
switch (method) {
case 'aid': return genAid(date);
case 'meid': return genMeid(date);
case 'meidg': return genMeidg(date);