27 lines
679 B
JavaScript
27 lines
679 B
JavaScript
/*!
|
|
* XRegExp Unicode Scripts 5.1.2
|
|
* <xregexp.com>
|
|
* Steven Levithan (c) 2010-present MIT License
|
|
* Unicode data by Mathias Bynens <mathiasbynens.be>
|
|
*/
|
|
|
|
import scripts from '../../tools/output/scripts';
|
|
|
|
export default (XRegExp) => {
|
|
|
|
/**
|
|
* Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive,
|
|
* and any spaces, hyphens, and underscores are ignored.
|
|
*
|
|
* Uses Unicode 14.0.0.
|
|
*
|
|
* @requires XRegExp, Unicode Base
|
|
*/
|
|
|
|
if (!XRegExp.addUnicodeData) {
|
|
throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts');
|
|
}
|
|
|
|
XRegExp.addUnicodeData(scripts, 'Script');
|
|
};
|