1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-06-15 03:35:16 +00:00

expose emoji unicode regexp that is internally used for emoji parsing (read only)

This commit is contained in:
Victor Gavro 2018-05-30 02:36:04 +03:00
parent 57423ac791
commit ea43c4f184

View File

@ -502,6 +502,10 @@ function createTwemoji(re) {
/*jshint maxparams:4 */ /*jshint maxparams:4 */
// RegExp based on emoji's official Unicode standards
// http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
var re = /twemoji/;
var var
// the exported module object // the exported module object
twemoji = { twemoji = {
@ -561,6 +565,9 @@ function createTwemoji(re) {
toCodePoint: toCodePoint toCodePoint: toCodePoint
}, },
// expose emoji unicode RegExp that is internally used for parsing (read only)
re: re,
///////////////////////// /////////////////////////
// methods // // methods //
@ -711,10 +718,6 @@ function createTwemoji(re) {
'"': '"' '"': '"'
}, },
// RegExp based on emoji's official Unicode standards
// http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
re = /twemoji/,
// avoid runtime RegExp creation for not so smart, // avoid runtime RegExp creation for not so smart,
// not JIT based, and old browsers / engines // not JIT based, and old browsers / engines
UFE0Fg = /\uFE0F/g, UFE0Fg = /\uFE0F/g,
@ -1066,4 +1069,4 @@ function createTwemoji(re) {
) + ) +
'\n */' '\n */'
) + '());'); ) + '());');
} }