fdsfd
This commit is contained in:
parent
628618df89
commit
e031240dff
3749 changed files with 1120848 additions and 1 deletions
26
node_modules/lodash/_hasUnicode.js
generated
vendored
Normal file
26
node_modules/lodash/_hasUnicode.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/** Used to compose unicode character classes. */
|
||||
var rsAstralRange = '\\ud800-\\udfff',
|
||||
rsComboMarksRange = '\\u0300-\\u036f',
|
||||
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
||||
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
||||
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
||||
rsVarRange = '\\ufe0e\\ufe0f';
|
||||
|
||||
/** Used to compose unicode capture groups. */
|
||||
var rsZWJ = '\\u200d';
|
||||
|
||||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
||||
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
||||
|
||||
/**
|
||||
* Checks if `string` contains Unicode symbols.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
||||
*/
|
||||
function hasUnicode(string) {
|
||||
return reHasUnicode.test(string);
|
||||
}
|
||||
|
||||
module.exports = hasUnicode;
|
Loading…
Add table
Add a link
Reference in a new issue