A logical or. AnyFilter matches as soon as one filter in its list matches.

Parameters

table
An array of filters. Defaults to an empty list, which never matches.

Properties

table
The array of filters. You can mutate this table in place — inserting or removing entries changes matching immediately.

Behavior

  • Empty never matches. AnyFilter.new() and AnyFilter.new({}) match nothing, since no entry can succeed.
  • Short-circuits. Evaluation stops at the first match.
  • Non-filter entries are ignored as non-matching. A junk value in the list simply fails to match instead of raising at call time.

Example

Errors