Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 847 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 847 Bytes

node-AhoCorasick

Build Status Coverage Status Dependency Status devDependency Status

Aho–Corasick string matching algorithm

Installation

npm install node-aho-corasick

Example

var AhoCorasick = require('node-aho-corasick');

ac = new AhoCorasick();
ac.add('123');
ac.add('321');
ac.build();
var res = ac.search('12321');
// ["123","321"]