Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Throw error directly if it is the only thing passed in as the message #117
Using an error as the argument incurs a relatively significant performance issue - since the Error is created before the condition is even tested. This pull request slightly improves performance because the current code will create two error objects if the assertion fails. We are now thinking of making a different repository that pre-registers error types, and then just passes in a string key in the assert.