From instanceof to Error.isError: safer error checking in JavaScript
For a long time, JavaScript developers have relied on instanceof to figure out, “Is this an error?” err instanceof Error // true...usually In normal code, that works fine. You rarely think about it. But once values come from other realms, things get weird, and the failures are silent. Everything “works”...