@ctrlo/error-handler
v1.0.1
Published
Module to gracefully display errors within the DOM
Downloads
283
Readme
@ctrlo/error-handler
Module to gracefully display errors within the DOM
Usage
// Create a new error handler instance and attach it to the specified element
const handler = new ErrorHandler(element);
// Add errors to the display - these can either be error objects or string values
handler.adderrors(new Error("This is an error object"), "This is an error string");
// Clear the displayed errors
handler.clearErrors();
