UNPKG

abbott-methods

Version:

abbott,methods,method,functions,function

9 lines (8 loc) 215 B
/** * @description 字符串中是否含有中文 * @param {String} string * @returns {Boolean} */ export const haveCn = (string: string): boolean => { return /[\u4e00-\u9fa5]+/.test(String(string)) }