tiny-invariant
tiny-invariant copied to clipboard
Option to return error without the prefix
it would be great to be able to pass an options like {prefix: false}
which would return error message without the prefix
This 100%! I am using Remix with ErrorBoundary and would love my error message to not have "Invariant Failed:" as part of it without having to wrap in a try catch and throw my own error.. not very friendly to the end user.
This would be great
I think this function should have 2 approaches.
-
Configure the prefix globally, be able to remove or set a new prefix.
-
Set the prefix or remove at function call level.
-
(optional) to have prefix scopes.