mvel icon indicating copy to clipboard operation
mvel copied to clipboard

New operators: isin

Open jgabrielygalan opened this issue 9 years ago • 0 comments

Hi,

I would like to know if you would be open to adding some other convenience operators. For example, I would find a simmetric operator to contains where the array in the RHS more natural in certain circumstances. For example, I have an object with a status and now I have to do this:

if {'bad_request', 'not_authorized'} contains context.error

while it would feel much more natural to do:

if context.error in {'bad_request', 'not_authorized'}

I know in is already taken for projections, so something like isin, or whatever. I can provide a pull request if it would be accepted.

jgabrielygalan avatar Apr 07 '15 14:04 jgabrielygalan