I looked at various sources of Node.js projects, and I noticed that some people use invariant . From what I understood, invariant is a tool that allows you to put statements in your code and raise errors if necessary.
Question:
When would you prefer to use invariant against metal bugs in the traditional way?
javascript error-handling invariants
rodrigo-silveira
source share