Nautical Poseidon Mythology
    Wondering what’s next for npm?Check out our public roadmap! »

    spellchecker
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/spellchecker package

    3.6.0 • Public • Published

    SpellChecker Node Module Build Status Build status

    Native bindings to NSSpellChecker, Hunspell, or the Windows 8 Spell Check API, depending on your platform. Windows 7 and below as well as Linux will rely on Hunspell.

    Installing

    npm install spellchecker

    Using

    SpellChecker = require 'spellchecker'

    SpellChecker.isMisspelled(word)

    Check if a word is misspelled.

    word - String word to check.

    Returns true if the word is misspelled, false otherwise.

    SpellChecker.getCorrectionsForMisspelling(word)

    Get the corrections for a misspelled word.

    word - String word to get corrections for.

    Returns a non-null but possibly empty array of string corrections.

    SpellChecker.checkSpelling(corpus)

    Identify misspelled words in a corpus of text.

    corpus - String corpus of text to spellcheck.

    Returns an Array containing {start, end} objects that describe an index range within the original String that contains a misspelled word.

    SpellChecker.checkSpellingAsync(corpus)

    Asynchronously identify misspelled words.

    corpus - String corpus of text to spellcheck.

    Returns a Promise that resolves with the Array described by checkSpelling().

    SpellChecker.add(word)

    Adds a word to the dictionary. When using Hunspell, this will not modify the .dic file; new words must be added each time the spellchecker is created. Use a custom dictionary file.

    word - String word to add.

    Returns nothing.

    Keywords

    none

    Install

    npm i [email protected]

    Version

    3.6.0

    License

    MIT

    Unpacked Size

    177 MB

    Total Files

    83

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar