UNPKG

nodehun

Version:

The Hunspell binding for nodejs that exposes as much of hunspell as possible and also adds new features. Hunspell is a first class spellcheck library used by Google, Apple, and Mozilla.

10 lines (5 loc) 298 B
const Nodehun = require('bindings')('Nodehun') const dictionaries = require('./dictionaries') const nodehun = new Nodehun(dictionaries.en_US.affix, dictionaries.en_US.dictionary) const encoding = nodehun.getDictionaryEncoding() console.log('Dictionary\'s encoding is:', encoding) // => 'UTF-8'