# @ccnokes/spellchecker

> Bindings to native spellchecker

Latest version **4.0.5** (published 2018-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ccnokes/spellchecker
pnpm add @ccnokes/spellchecker
yarn add @ccnokes/spellchecker
bun add @ccnokes/spellchecker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.5 |
| Published | 2018-05-01 |
| First published | 2018-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 41.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Maintainers | cameronnokes |

## Links

- npm: https://www.npmjs.com/package/@ccnokes/spellchecker
- Repository: https://github.com/ccnokes/node-spellchecker
- Homepage: http://github.com/ccnokes/node-spellchecker
- Issues: https://github.com/ccnokes/node-spellchecker/issues
- npm.io page: https://npm.io/package/@ccnokes/spellchecker

## Dependencies (3)

- [nan](https://npm.io/package/nan.md) ^2.0.0
- [bindings](https://npm.io/package/bindings.md) ^1.3.0
- [prebuild-install](https://npm.io/package/prebuild-install.md) ^2.5.3

## Recent versions

- 4.0.5 (latest) — 2018-05-01
- 4.0.4 — 2018-05-01
- 4.0.3 — 2018-05-01
- 4.0.2 — 2018-05-01
- 4.0.1 — 2018-05-01

## README

# SpellChecker Node Module

[![Build status](https://ci.appveyor.com/api/projects/status/kmilw63dodpu2xvr?svg=true)](https://ci.appveyor.com/project/ccnokes/node-spellchecker)
[![Build Status](https://travis-ci.org/ccnokes/node-spellchecker.svg?branch=master)](https://travis-ci.org/ccnokes/node-spellchecker)

Native bindings to [NSSpellChecker](https://developer.apple.com/library/mac/#documentation/cocoa/reference/ApplicationKit/Classes/NSSpellChecker_Class/Reference/Reference.html) or the [Windows 8 Spell Check API](https://msdn.microsoft.com/en-us/library/windows/desktop/hh869853(v=vs.85).aspx), depending on your platform.

## Installing

```bash
npm install @ccnokes/spellchecker
```

## Using

```javascript
import { SpellChecker } from '@ccnokes/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.

### SpellChecker.isSupported()

Tells if your platform is supported. If it's not, you can use the API as normal, just nothing will actually work.

Returns boolean.

---
_Source: https://npm.io/package/@ccnokes/spellchecker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
