Urara-Blog/node_modules/.pnpm-store/v3/files/3c/a24701aba71ae05d5e6055c0ad931de2e1c350a1191547fa55625b245313c984499935180f4067cb15ec1c2909ecd4d5d2b2088cce30a877a56771f0deff03
2022-08-14 01:14:53 +08:00

15 lines
491 B
Text

/** Used to detect strings that need a more robust regexp to match words. */
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
/**
* Checks if `string` contains a word composed of Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a word is found, else `false`.
*/
function hasUnicodeWord(string) {
return reHasUnicodeWord.test(string);
}
module.exports = hasUnicodeWord;