wupengfei
2025-09-23 22a6de40ac6693463cdbbe9ed1e3ef05fc301afc
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');