assert-fn-throw-typeerror
v1.0.0
Published
Wrapper for assert-fn that makes it throw a TypeError instead of an assertion error
Maintainers
Readme
assert-fn-throw-typeerror
Wrapper for assert that throws TypeError instead of AssertionError
var assert = require("assert-fn")
// or
var assert = require("node:assert")
var TE = require("assert-fn-throw-typeerror")
TE(() => assert(false, "Assertion failed blabla")) // Uncaught TypeError: Assertion failed blabla