Sha256: a2ed37159b293c0a543cd0ad35f3b7154039f0f004b1e3ea505a0e1515e208d3

Contents?: true

Size: 949 Bytes

Versions: 273

Compression:

Stored size: 949 Bytes

Contents

/** 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;

Version data entries

273 entries across 272 versions & 29 rubygems

Version Path
rapid_stack-0.2.0 templates/frontend/node_modules/lodash/_hasUnicode.js
rapid_stack-0.1.1 templates/FrontEnd/node_modules/lodash/_hasUnicode.js
rapid_stack-0.1.0 templates/FrontEnd/node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.60 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.59 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.58 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.57 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.56 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.55 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.54 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.53 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.52 node_modules/lodash/_hasUnicode.js
trusty-cms-6.3.1 node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.51 node_modules/lodash/_hasUnicode.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_hasUnicode.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_hasUnicode.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_hasUnicode.js
immosquare-cleaner-0.1.50 node_modules/lodash/_hasUnicode.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_hasUnicode.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_hasUnicode.js