robert-bor/aho-corasick — pull request #14 by rripken (2014-10-06 18:14:06+00:00)
Title: Possible implementation of a matches method.

I see that someone else also suggested an implementation of a matches or hasMatches method. That the other branch didn't properly account for the TrieConfig options and didn't include test cases.
Basic idea is that in some cases it isn't important to know what the match is, only whether or not a string contains a match. In those cases the method can return as soon as it finds the first suitable match. With a large number of search keywords and a large string to search the difference between finding the first match and finding all matches can be very significant.

Maybe "contains" or "containsAny" would be a better method name.