Improvements
.otherwise
now passes the input value to the handler function. This can be useful when your default handler is a statically defined function and you want to avoid writing an intermediary anonymous function passing the input to it. PR #37 from @oguimbal 🙏
Bug fix
- It's now possible to pattern-match on native
Error
objects. To save some compilation time, deep pattern matching on builtin objects is disabled, but it turns out this can be pretty handy to pattern match on nativeError
objects because some libs (like@apollo/client
) enhance them with additional properties.