# close-word

> this module will help to find the closest word from given set of words

Latest version **1.2.1** (published 2020-08-30) · ISC license · 0 weekly downloads

## Install

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

## 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 | 1.2.1 |
| Published | 2020-08-30 |
| First published | 2020-08-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | R Isuru Sameera Sandaruwan |
| Maintainers | isuru1988 |
| Keywords | close, word, string matching |

## Links

- npm: https://www.npmjs.com/package/close-word
- npm.io page: https://npm.io/package/close-word

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.2.1 (latest) — 2020-08-30
- 1.2.0 — 2020-08-28
- 1.1.2 — 2020-08-28
- 1.0.2 — 2020-08-27
- 1.0.1 — 2020-08-27
- 1.0.0 — 2020-08-27

## README

# Introduction

get closest word for a specific word from given set of word list

# installation

`npm i close-word --save`

## Code sample  to find closest word

```js
var word_finder = require('close-word')

var result  = word_finder.findClosestOne('newbyrork',['new york','new delhi','kandy','paris','new jersey','london','colombo','jafna']);
 
console.log(result); // result =  { word: 'new york', score: 397.6190476190476 }


```

## Code sample  to find 5 closest words
```js
var word_finder = require('close-word');

var result  = word_finder.findClosestFive('newbyrork',['new york','new delhi','kandy','paris','new jersey','london','colombo','jafna']);

console.log(result);
/*
 result  =  [
  { word: 'new york', score: 397.6190476190476 },
  { word: 'new jersey', score: 216.39344262295083 },
  { word: 'new delhi', score: 166.39344262295083 },
  { word: 'kandy', score: 112.34567901234568 },
  { word: 'london', score: 112.34567901234568 }
] */

```

## Code sample  to find any number closest words  according to the 3rd param you given to the function.in this case 3
```js
var word_finder = require('close-word');

var result  = word_finder.findClosestAny('newbyrork',['new york','new delhi','kandy','paris','new jersey','london','colombo','jafna'], 3 );

console.log(result);
/*
 result  =  [
  { word: 'new york', score: 397.6190476190476 },
  { word: 'new jersey', score: 216.39344262295083 },
  { word: 'new delhi', score: 166.39344262295083 }
]*/

```




# if lib gives a word with very low score ,filter them from ur code using a threshold value

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