# is-word

> npm module to check if a word exists in a language

Latest version **1.0.4** (published 2019-08-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install is-word
pnpm add is-word
yarn add is-word
bun add is-word
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-08-10 |
| First published | 2019-08-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 25.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Nimish Agrawal |
| Maintainers | nimishagarwal76 |
| Keywords | dictionary, words, word, exist, language, check, trie, search |

## Links

- npm: https://www.npmjs.com/package/is-word
- Repository: https://github.com/nimishagarwal76/is-word
- Homepage: https://github.com/nimishagarwal76/is-word#readme
- Issues: https://github.com/nimishagarwal76/is-word/issues
- npm.io page: https://npm.io/package/is-word

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2019-08-10
- 1.0.3 — 2019-08-10
- 1.0.1 — 2019-08-10
- 1.0.0 — 2019-08-10

## README

![Built with love](http://forthebadge.com/images/badges/built-with-love.svg)

# is-word
Checks if a word exists in a language. Currently supports 10 languages. Uses tries to get very fast results.

### Installation
```bash
$ npm install is-word
```

### Usage
```js
var isWord = require('is-word');
var englishWords = isWord('american-english');

console.log(englishWords.check('direction')); // true
console.log(englishWords.check('asddsaaaa')); // false
```
``isWord()`` returns an object having a trie of the configured language. The object has check method which returns a boolean value if a word is present in a language or not.

### Configure
To change the languages,

american-english - ``isWord('american-english');``

brazilian - ``isWord('american-english');``

british-english - ``isWord('british-english');``

french - ``isWord('french');``

italian - ``isWord('italian');``

ngerman - ``isWord('ngerman');``

ogerman - ``isWord('ogerman');``

portuguese - ``isWord('portuguese');``

spanish - ``isWord('spanish');``

swiss - ``isWord('swiss');``




### Why is-word ?
is-word is very fast compared to existing checkers which use a regex for all available words. is-word uses tries data structure which causes comparisons to be done very quickly. Trie creation takes some time but if there are a lot of words to be checked then is-word is way ahead than others.

### Features and Contributions
is-word was initially created for testing inconsistencies and mistakes in translations but can be expanded to much more. So if you have any feature suggestions feel free to open a PR.

Though I have tested the code against a lot of test cases, still if you find a bug, feel free to raise an issue.

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