# find-most-similar

> Use Levenshtein distance alg to find the most similar word in an array to the target word Edit

Latest version **1.0.3** (published 2017-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-most-similar
pnpm add find-most-similar
yarn add find-most-similar
bun add find-most-similar
```

## 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.0.3 |
| Published | 2017-06-24 |
| First published | 2017-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Braxton Frederick |
| Maintainers | thatbraxguy |
| Keywords | string, match, levenshtein |

## Links

- npm: https://www.npmjs.com/package/find-most-similar
- Repository: https://github.com/thatbraxguy/findMostSimilar
- Homepage: https://github.com/thatbraxguy/findMostSimilar#readme
- Issues: https://github.com/thatbraxguy/findMostSimilar/issues
- npm.io page: https://npm.io/package/find-most-similar

## 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.0.3 (latest) — 2017-06-24
- 1.0.2 — 2017-06-24
- 1.0.0 — 2017-06-24

## README

# find Most Similar
Use Levenshtein distance alg to find the most similar word in an array. Perfect for providing suggestions in error messages and/or recovering from spelling mistakes.

## Install

Install via npm

```sh

 npm install --save find-most-similar

```

## How to use

```javascript

import findMostSimilar from 'find-most-similar';

// the word you are checking others against
const source = 'book';

// words to search for the closest to the source word
const words = ['lock','block', 'back', 'hack'];

// returns the word that requires the fewest changes to convert to the source word
findMostSimilar(source, words);

// returns 'back'

```

## License

 [MIT](https://github.com/thatbraxguy/findMostSimilar/blob/master/LICENSE)

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