Asserts that the given value is an Error.
Error to assert.
If the given value is not an instance of the Error class.
Error
toError
v0.1.0
try { // ...} catch (err) { assertError(err); console.log(err.message);} Copy
try { // ...} catch (err) { assertError(err); console.log(err.message);}
Asserts that the given value is an Error.