demo · v134 · javascript

Test Suite

Sixteen pathological inputs. For each, we run Error.isError(x), x instanceof Error, Object.prototype.toString.call(x) === "[object Error]", and x.constructor?.name?.endsWith("Error"). Side-by-side scoreboard so you can see which check actually does what people expect.

input Error.isError instanceof Error toString tag name endsWith

why the other checks fail

see also