Merge pull request #1201 from hotoo/refact-button-regexp

refact(regexp): better regexp
This commit is contained in:
afc163 2016-03-15 22:59:33 +08:00
commit 11da47f1f6

View File

@ -2,7 +2,7 @@ import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { findDOMNode } from 'react-dom'; import { findDOMNode } from 'react-dom';
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2,2}$/; const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar); const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
function isString(str) { function isString(str) {
return typeof str === 'string'; return typeof str === 'string';