style: utils code style

This commit is contained in:
xingyu4j
2025-04-23 14:37:35 +08:00
parent 455d396f96
commit 5988b85507
5 changed files with 134 additions and 132 deletions

View File

@@ -9,10 +9,9 @@ const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
* @param value 值
* @returns 是否为手机号码(中国)
*/
export function isMobile(value?: string | null): boolean {
export function isMobile(value?: null | string): boolean {
if (!value) {
return false;
}
return MOBILE_REGEX.test(value);
}