You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
The method will assume the second pattern object as the callback.
Proposed Solution
Allow match() to accept an array of patterns while providing a new optional flag that will inform the method that it should handle an array of patterns not lookup the array structure in the payload.
The text was updated successfully, but these errors were encountered:
Problem:
There are scenarios that require matching an item in an array but also the following item (or items at any other index). Example:
For the
payload
I would like to match the following objects:However, the
match()
function accepts only 1pattern
. If arguments are passed as follows:The method will assume the second pattern object as the callback.
Proposed Solution
Allow
match()
to accept anarray of patterns
while providing a new optional flag that will inform the method that it should handle anarray of patterns
not lookup the array structure in thepayload
.The text was updated successfully, but these errors were encountered: