Closed Eswcvlad closed 4 months ago
Documentation says the second parameter must be one of: string|boolean|number|null
, but the implementation allows any
.
We can fix this by either changing the documentation to be more premissive, or the implementation to be more strict...
In the current version the following expressions do not throw a TypeError and return an odd result:
contains([1, `[2]`, 3], `[2]`)
->false
contains([1, {a: 1}, 3], {a: 1})
->false
Seems like a valid use case tbh.