kmp

0.0.3 • Public • Published

kmp

Knuth-Morris-Pratt string searching algorithm in Javascript.

NPM

Install

npm install kmp
bower install kmp

Usage

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

npm test

License

MIT

Package Sidebar

Install

npm i kmp

Weekly Downloads

36

Version

0.0.3

License

MIT

Last publish

Collaborators

  • miguelmota