From ce49de0e3d228e795090ba11a24b34bb940d6fe3 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期日, 19 十月 2025 21:32:50 +0800
Subject: [PATCH] feat: 1.2.0.1
---
packages/utils/common.ts | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/packages/utils/common.ts b/packages/utils/common.ts
index 13bbb46..a02170f 100644
--- a/packages/utils/common.ts
+++ b/packages/utils/common.ts
@@ -136,7 +136,20 @@
return realIDNumber.replace(/^(\d+)(.{6})$/, '$1******');
};
+export const showBankCodeForEnd4 = (bankCode: string) => {
+ if (!bankCode) return '';
+ return '*'.repeat(Math.max(0, bankCode.length - 4)) + bankCode.slice(-4);
+};
+
export const hiddenPhone = (phone: string) => {
if (!phone) return '';
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
};
+
+export function filterCN(str: string) {
+ return str.replace(/[\u4e00-\u9fa5]/gi, '');
+}
+
+export function filterNotCN(str: string) {
+ return str.replace(/[^\u4e00-\u9fa5]/gi, '');
+}
--
Gitblit v1.9.1