errorify-lite
v0.0.1
Published
Une version légère d'Errorify pour expliquer les erreurs JS les plus communes.
Maintainers
Readme
Errorify Lite
A lightweight library to explain common JavaScript errors in plain English.
Installation
npm install errorify-liteUsage
import { errorify } from 'errorify-lite';
try {
const user = undefined;
console.log(user.name);
} catch (error) {
const explanation = errorify(error);
console.log(explanation);
// "You are trying to access a property on 'undefined'. Check if your variable is initialized."
}Features
- Covers common
TypeError,ReferenceError,SyntaxError. - Ultra lightweight.
- English support.
