Divide a string of Japanese Kana into mora
$ npm i kana2mora
You can use ECMAScript modules.
import { katakana2mora } import "kana2mora"
katakana2mora("チョコレート") // ["チョ", "コ", "レ", "ー", "ト"]
You can also use CommonJS modules.
const { katakana2mora } = require("kana2mora")
katakana2mora("チョコレート") // ["チョ", "コ", "レ", "ー", "ト"]