A MatcherSet that only reports a single match.
Forwards rows to child matchers, but stops processing when a match occurs. This is useful to avoid reporting multiple similar matches for the same row:
const set = new OneOnlyMatcherSet([ new Pattern('987654321'), new Pattern('87654321'), new Pattern('7654321'), new Pattern('654321'), new Pattern('54321'), new Pattern('4321'),]); Copy
const set = new OneOnlyMatcherSet([ new Pattern('987654321'), new Pattern('87654321'), new Pattern('7654321'), new Pattern('654321'), new Pattern('54321'), new Pattern('4321'),]);
The example above will report only one match for '987654321' rather than six.
Constructor.
Matchers in the set.
Protected
Provides read access to the count of matches.
Provides read access to matchers
Matches a row string. Override to abort processing when a match occurs.
A MatcherSet that only reports a single match.
Forwards rows to child matchers, but stops processing when a match occurs. This is useful to avoid reporting multiple similar matches for the same row:
The example above will report only one match for '987654321' rather than six.