A lightweight spellchecker written in Javascript.
yarn add rt-spellcheck
Optionaly you could add dictionary
yarn add dictionary-en
Initialize a spellchecker instance:
import Spellchecker from 'rt-spellcheck'
const spellchecker = new Spellchecker('en')
const isValid = spellchecker.check('red')
Or load custom dictionary
const Spellchecker = require('rt-spellcheck')
const aff = require('dictionary-en/index.aff')
const dic = require('dictionary-en/index.dic')
const spellchecker = new Spellchecker()
spellchecker.dict.addAffixFile(aff)
spellchecker.dict.addDicFile(dic)
const isValid = spellchecker.check('red')
Open source licensed as MIT.