mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
refact(regexp): better regexp
This commit is contained in:
parent
e973cb7cc8
commit
1c35bd3d9d
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { findDOMNode } from 'react-dom';
|
||||
|
||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2,2}$/;
|
||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
||||
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
||||
function isString(str) {
|
||||
return typeof str === 'string';
|
||||
|
Loading…
Reference in New Issue
Block a user