feat(shell): update uix svc

This commit is contained in:
Il Harper 2024-03-05 22:36:01 +08:00
parent 692f034e93
commit 650e19dddb
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC

View File

@ -1,6 +1,8 @@
const uinRegex = /\d+/
const isUin = (uin: unknown) => typeof uin === 'string' && uinRegex.test(uin)
const isUin = (uin: unknown) =>
(typeof uin === 'string' && uin !== '0' && uinRegex.test(uin)) ||
(typeof uin === 'number' && uin > 9999)
const isUid = (uid: unknown) =>
typeof uid === 'string' && uid.length === 24 && uid.startsWith('u_')