zhengyiming
2025-11-06 a10592de9fe37dd97f3113cb8c56b071d12b4bb5
packages/utils/common.ts
@@ -136,6 +136,11 @@
  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');