errorize
Ensure it is (or make it an) error.
Because some folks throw strings or other stuff.
npm install errorize --save
var errorize = ;
It returns the object passed as an error
var e = ;
It preserves the object's properties into the error
var obj = key: 'value'; var e = ; ekey == 'value'
It decorates functions to ensure arg1 (if present) is an error
// or
It can transform error to (json) serializable object
JSON;
It can include a partial stack in the translation
JSON;