lib/replaceEmoji.js
function grabTheRightIcon(rawText) {
	// if variant is present as \uFE0F
	return toCodePoint(rawText.indexOf(U200D) < 0 ?
		rawText.replace(UFE0Fg, '') :
		rawText
	);
}
function grabTheRightIcon(rawText) {
	// if variant is present as \uFE0F
	return toCodePoint(rawText.indexOf(U200D) < 0 ?
		rawText.replace(UFE0Fg, '') :
		rawText
	);
}
Used to both remove the possible variant
and to convert utf16 into code points.
If there is a zero-width-joiner (U+200D), leave the variants in.
@param   string    the raw text of the emoji match