emoji-picker-react
emoji-picker-react copied to clipboard
emoji.length is 5 for some emojies and 2 for some
trafficstars
if we print emoji.length, then it is givin output as 2 for 😃 but for imojis like 🕵️ it gives 5. Thus if we want to check if there is only 1 emoji in input box, then how can we check , initially we thought of checking using emoji.length
new Intl.Segmenter({ granularity: "grapheme" }).segment() should work