zhengyiming
昨天 2f070f104a16415fd9447bb2f7f9a0ca4027ec16
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, '');
}