# hunspell-spellchecker

> Parse and use Hunspell dictionaries in Javascript

Latest version **1.0.2** (published 2015-08-16) · Apache 2 license · 0 weekly downloads

## Install

```sh
npm install hunspell-spellchecker
pnpm add hunspell-spellchecker
yarn add hunspell-spellchecker
bun add hunspell-spellchecker
```

Provides the command `hunspell-tojson`.

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-08-16 |
| First published | 2015-03-14 |
| Weekly downloads | 0 |
| License | Apache 2 |
| TypeScript types | separate (@types/hunspell-spellchecker) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 78 |
| Author | GitBook |
| Maintainers | samypesse |
| Keywords | licenses |

## Links

- npm: https://www.npmjs.com/package/hunspell-spellchecker
- Repository: https://github.com/GitbookIO/hunspell-spellchecker
- Issues: https://github.com/GitbookIO/hunspell-spellchecker/issues
- npm.io page: https://npm.io/package/hunspell-spellchecker

## Recent versions

- 1.0.2 (latest) — 2015-08-16
- 1.0.1 — 2015-05-25
- 1.0.0 — 2015-03-14

## README

# Hunspell Spellchecker in Javascript

[![Build Status](https://travis-ci.org/GitbookIO/hunspell-spellchecker.png?branch=master)](https://travis-ci.org/GitbookIO/hunspell-spellchecker)
[![NPM version](https://badge.fury.io/js/hunspell-spellchecker.svg)](http://badge.fury.io/js/hunspell-spellchecker)

A lightweight spellchecker written in Javascript, it can be used in Node.JS and in the browser. It has been build to be pre-parse Hunspell dictionary to JSON.

### Installation

```
$ npm install hunspell-spellchecker
```

### API

Initialize a spellchecker instance:

```js
var Spellchecker = require("hunspell-spellchecker");

var spellchecker = new Spellchecker();
```

Parse and serialize a dictionary

```js
// Parse an hunspell dictionary that can be serialized as JSON
var DICT = spellchecker.parse({
    aff: fs.readFileSync("./en_EN.aff");
    dic: fs.readFileSync("./en_EN.dic")
});
```

Load a serialized dictionary

```js
// Load a dictionary
spellchecker.use(DICT);
```

Check a word:

```js
// Check a word
var isRight = spellchecker.check("tll");
```

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