Skip to content

Latest commit

 

History

History

ayamari

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@daisugi/ayamari

version npm downloads bundlephobia

This project is part of the @daisugi monorepo.

Ayamari helps you to create rich errors in a simple and consistent way.

🌟 Features

  • 💡 Minimum size overhead.
  • ⚡️ Written in TypeScript.
  • 📦 Only uses trusted dependencies.
  • 🔨 Powerful and agnostic to your code.
  • 🧪 Well tested.
  • 🤝 Is used in production.
  • ⚡️ Exports ES Modules as well as CommonJS.

Usage

import { Ayamari } from '@daisugi/ayamari';

const { errFn } = new Ayamari();

try {
  eval('{');
} catch (err) {
  errFn.UnexpectedError('Something went wrong.', {
    cause: err,
  });
}

Table of contents

Install

Using npm:

npm install @daisugi/ayamari

Using yarn:

yarn add @daisugi/ayamari

🔝 back to top

Overview

Ayamari improves error handling for developers by simplifying the process and making it more manageable. It achieves this by enhancing the legibility of exception output and providing contextual rich errors with causes. The library includes several useful features:

  • ✅ By default, no stack is generated for performance improvement.
  • ✅ Chains of causes.
  • ✅ Properties to provide extra information about the error.
  • ✅ Custom errors.
  • ✅ Pretty stack traces.
  • ✅ Levels for categorizing errors.

Other projects

Meet the ecosystem

🔝 back to top

License

MIT