Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Handle emoji with skin tone variations.
Skin Tone Modifiers is easiest to learn by reading the example, changing it, and observing the result.
// A skin tone modifier (U+1F3FB..U+1F3FF) follows a base emoji
const wave = '👋';
const waveTan = '👋🏽'; // 👋 + U+1F3FD
console.log([...wave].length); // 1 code point
console.log([...waveTan].length); // 2 code points (base + modifier)
const seg = new Intl.Segmenter('en', { granularity: 'grapheme' });
console.log([...seg.segment(waveTan)].length); // 1 graphemePractice the Skin Tone Modifiers example in a small scratch file, then explain what changed and why.