custom-err
Easily create an error object with custom properties attached.
API
Err(message, properties)
Usage
var Err = assert = ; // the first argument represents the error message// the second argument represents the custom properties objectvar myErr = ; assert;assert;
Why?
Because I found myself often writing code like this:
var err = 'Not Found';errcode = 404;errsomeProperty = true;
License
MIT