An async hunspell binding for node.js
C++ Python JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
deps/hunspell Remove duplicate file (contents) May 6, 2012
src Nan-ize Apr 23, 2015
LICENSE Initial commit May 6, 2012 Fix sample output in example in readme Aug 15, 2012
binding.gyp Nan-ize Apr 23, 2015
index.js Initial commit May 6, 2012
package.json bump version Apr 23, 2015


An async hunspell binding for node.js.



npm install spellcheck


  • Check a word:
  // this example uses the en_US hunspell files from SCOWL:
  var SpellCheck = require('spellcheck'),
        base = __dirname + (process.platform === 'win32' ? '\\' : '/'),
        spell = new SpellCheck(base + 'en_US.aff', base + 'en_US.dic');

  spell.check('sain', function(err, correct, suggestions) {
      if (err) throw err;
      if (correct)
        console.log('Word is spelled correctly!');
        console.log('Word not recognized. Suggestions: ' + suggestions);

  // output:
  // Word not recognized. Suggestions: chain,sin,saint,satin,stain,slain,swain,rain,sail,lain,said,gain,main,spin,pain



  • (constructor)(<String>affixPath, <Integer>dictPath) - Creates and returns a new SpellCheck instance. affixPath is an absolute path that points to an affix (.aff) file. dictPath is an absolute path that points to a dictionary (.dic) file.

  • check(<String>word, <Function>callback) - (void) - Spell checks the given word. The callback receives three arguments: an <Error> object in case of error (null otherwise), a <Boolean> indicating if the word was spelled correctly, and if the word was not recognized, an <Array> of suggested words.