Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
chain-able-deps / src / regexp / matchUnicode.ts
Size: Mime:
/**
 * @desc Used to compose unicode character classes.
 * {@link https://github.com/qfox/heatfiler/blob/master/lib/uni.js qfox-uni}
 * @type {string}
 */
const rsAstralRange = '\\ud800-\\udfff'
const rsComboMarksRange = '\\u0300-\\u036f'
const reComboHalfMarksRange = '\\ufe20-\\ufe2f'
const rsComboSymbolsRange = '\\u20d0-\\u20ff'
const rsComboRange =
  rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange
const rsVarRange = '\\ufe0e\\ufe0f'

/**
 * @desc Used to compose unicode capture groups.
 * @type {string}
 */
const rsZWJ = '\\u200d'

/**
 * @desc 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/).
 *
 * @name matchUnicode
 * @type {RegExp}
 */
export default RegExp(`[${rsZWJ + rsAstralRange + rsComboRange + rsVarRange}]`)