# Pastebin TfliWeVm function *graphemes(str) { const r = /(\P{Mark})(\p{Mark}+)/gu; yield * [...str.matchAll(r)].map(m => m[0]); }