@antv/layout
Version:
graph layout algorithm
39 lines (31 loc) • 1.23 kB
JavaScript
/** Used to compose unicode character classes. */
var _hasUnicode;
var hasRequired_hasUnicode;
function require_hasUnicode () {
if (hasRequired_hasUnicode) return _hasUnicode;
hasRequired_hasUnicode = 1;
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);
}
_hasUnicode = hasUnicode;
return _hasUnicode;
}
export { require_hasUnicode as __require };
//# sourceMappingURL=_hasUnicode.js.map