# kmp

> Knuth-Morris-Pratt string searching algorithm.

Latest version **0.0.3** (published 2015-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install kmp
pnpm add kmp
yarn add kmp
bun add kmp
```

## 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.3 |
| Published | 2015-06-18 |
| First published | 2015-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Miguel Mota |
| Maintainers | miguelmota |
| Keywords | string, search, algorithm, indexof |

## Links

- npm: https://www.npmjs.com/package/kmp
- Repository: https://github.com/miguelmota/knuth-morris-pratt
- Issues: https://github.com/miguelmota/knuth-morris-pratt/issues
- npm.io page: https://npm.io/package/kmp

## 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

- 0.0.3 (latest) — 2015-06-18
- 0.0.2 — 2015-06-18

## README

# kmp

> [Knuth-Morris-Pratt](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm) string searching algorithm in Javascript.

[![NPM](https://nodei.co/npm/kmp.png)](https://nodei.co/npm/kmp)

# Install

```bash
npm install kmp
```

```bash
bower install kmp
```

# Usage

```javascript
var kmp = require('kmp');

console.log(kmp('she sells seashells by the seashore', 'shell')); // 13
console.log(kmp('she sells seashells by the seashore', 'seaweed')); // -1
```

# Test

```bash
npm test
```

# License

MIT

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