zhengyiming
2025-09-15 e84fe84688a2e962c5435296029f96d8d4f69cae
packages/utils/common.ts
@@ -135,3 +135,16 @@
  if (!realIDNumber) return '';
  return realIDNumber.replace(/^(\d+)(.{6})$/, '$1******');
};
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, '');
}