Maybe a bit off-topic, but are there good spellcheckers written in JavaScript?
SymSpell algorithm (which is quite different, I'll go into it in the next part to some extent) is much easier to port, so there is a JS SymSpell port[3] (which seems abandoned though).
0: https://zverok.github.io/blog/2021-01-05-spellchecker-1.html
1: https://github.com/wooorm/nspell