@daisugi/ayamari
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@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

Package Sidebar

Install

npm i @daisugi/ayamari

Weekly Downloads

32

Version

0.4.0

License

MIT

Unpacked Size

40.7 kB

Total Files

16

Last publish

Collaborators

  • sviridoff
  • mawrkus