nodehun-sentences
nodehun is a great library for interacting with hunspell from node.js. It's fairly low-level, however, letting you check one word at a time. nodehun-sentences
lets you easily check whole sentences or chunks of text for errors.
It asynchronously checks all the words and returns with a result array containing all the encountered typos. For each typo, you will also get an array of all the positions within the string where the typo was encountered, so you can easily visualize all errors.
Installation
$ npm install --save nodehun-sentences
Usage
const spellcheck =
Taken from examples/spellcheck.js
:
const fs = const spellcheck = const nodehun = const hunspell = fs fs const text = 'This is some text we want to ceck for typos'
License
MIT-licensed. See LICENSE.