# did-you-mean

> Fuzzy match a command from a list (typo-safety)

Latest version **0.0.1** (published 2014-11-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install did-you-mean
pnpm add did-you-mean
yarn add did-you-mean
bun add did-you-mean
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-11-03 |
| First published | 2014-06-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 67 |
| Author | Boris Okunskiy |
| Maintainers | inca |
| Keywords | typo, match, fuzzy, list, array, command, search, index |

## Links

- npm: https://www.npmjs.com/package/did-you-mean
- Repository: https://github.com/inca/did-you-mean
- Issues: https://github.com/inca/did-you-mean/issues
- npm.io page: https://npm.io/package/did-you-mean

## Dependencies (2)

- [underscore](https://npm.io/package/underscore.md) *
- [levenshtein](https://npm.io/package/levenshtein.md) *

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-11-03
- 0.0.0 — 2014-06-30

## README

# Did You Mean ...

Fuzzy match a word from your list of commands or keywords in Node.js to provide
a friendly typo-safe human prompt.

You can use it in:

  * your CLI
  * a web application
  * URLs
  * etc.

## Installation

```
npm install did-you-mean
```

## Usage

```
var Matcher = require('did-you-mean');

// Create a matcher with a list of values
var m = new Matcher('init install update upgrade');

// Get the closest match
m.get('udpate');   // 'update'

// Set the threshold (the maximum Levenshtein distance)
m.setThreshold(3);

// List all matches
m.list('udpate');    // [ { value: 'update', distance: 2 }, { value: 'upgrade', distance: 3 } ]

// Set ignore case
m.ignoreCase();

// Set match case
m.matchCase();

// Add more values
m.add('merge', 'checkout', 'commit');
```

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