split-graphemes
Divide ligature letters such as Thai, Khmer letters and complex emoji into array of graphemes.
You can simply use this library instead of Array.from
to get graphemes.
Installation
$ npm install split-graphemes
Examples
Emoji
const chars = Array.from('👨👩👦👦')
const chars = splitGraphemes('👨👩👦👦')
Khmer characters
Array.from('ប៉ុស្ដិ៍')
splitGraphemes('ប៉ុស្ដិ៍')
Japanese NFD
splitGraphemes('ごん゙に゙ぢば')
splitGraphemes('パピプペポ')
English
splitGraphemes('Hello')
Supported ligature characters
The list of characters is at here.