rt-spellcheck
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Real Time Spellchecker in Javascript

Version Downloads Last commit

A lightweight spellchecker written in Javascript.

Installation

yarn add rt-spellcheck

Optionaly you could add dictionary

yarn add dictionary-en

API

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')

License

Open source licensed as MIT.

Readme

Keywords

Package Sidebar

Install

npm i rt-spellcheck

Weekly Downloads

6

Version

1.0.5

License

MIT

Unpacked Size

21.3 kB

Total Files

38

Last publish

Collaborators

  • pasalietis