UNPKG

zitcher

Version:

字符串匹配算法相关js实现

11 lines (10 loc) 228 B
var kmp = require('./lib/kmp.js') var ac = require('./lib/ac.js') function matcher(pattern) { if (typeof pattern === 'string') { return new kmp(pattern) } else { return new ac(pattern) } } module.exports = matcher