Knuth-Morris-Pratt string searching algorithm in Javascript.
npm install kmp
bower install kmp
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
npm test
MIT