Skip to content

guliash/kmp-matcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

kmp-matcher

Knuth Morris Pratt algorithm's realisation in js

Example

var kmp = require('kmp-matcher');
kmp.kmp('aabbaaccdsbbaab', 'a'); // returns an array of positions of all occurrences [0, 1, 4, 5, 12, 13]