Maybe dumb, but is there a way to write a when state for strings, but for one of the string cases I want there to be a wild card at the end?
My scenario is when matching routes but some routes have arguments at the end.
instead of hard coding the arg.
Or do I have to basically refactor this and just use endsWith or something?
d
Dave K
07/09/2021, 6:40 AM
Shouldn’t your request path already not include query params?
Either way, IIRC the when with a variable in context can only do equals, is, or in type comparisons but if you make it just an empty when it would allow you to write expressions that evaluate to some Boolean which could include a startsWith or some regex comparison