JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q26068F
  • License MIT

Parse and use Hunspell dictionaries in Javascript

Package Exports

  • rt-spellcheck

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rt-spellcheck) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.