in src/index.js [43:65]
url: codepoints ? getTwemojiUrl(codepoints, assetType) : '',
indices: [result.index, emojiRegex.lastIndex],
text: emojiText,
type: TypeName
});
}
return entities;
}
const vs16RegExp = /\uFE0F/g;
// avoid using a string literal like '\u200D' here because minifiers expand it inline
const zeroWidthJoiner = String.fromCharCode(0x200d);
const removeVS16s = rawEmoji => (rawEmoji.indexOf(zeroWidthJoiner) < 0 ? rawEmoji.replace(vs16RegExp, '') : rawEmoji);
export function toCodePoints(unicodeSurrogates: string): Array<string> {
const points = [];
let char = 0;
let previous = 0;
let i = 0;
while (i < unicodeSurrogates.length) {
char = unicodeSurrogates.charCodeAt(i++);
if (previous) {