reaction icon indicating copy to clipboard operation
reaction copied to clipboard

Add match operator to support regular expression matching

Open alex-haproff opened this issue 5 years ago • 0 comments

Current set of operators is pretty basic and we already have a couple of production use-cases where regular expression matching for Surcharge and Fulfillment restrictions is vital.

https://github.com/reactioncommerce/api-utils/blob/trunk/lib/operators.js

Add match operator akin to this:

match(varA, varB) { return RegExp(varB, "ig").test(varA); }

alex-haproff avatar Mar 16 '20 10:03 alex-haproff