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

0.6.2 • 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

  • 💡 Minimal size overhead (details)
  • ⚡️ Written in TypeScript
  • 📦 Uses only trusted dependencies
  • 🔨 Powerful and agnostic to your code
  • 🧪 Well-tested
  • 🤝 Used in production
  • 🔀 Supports both ES Modules and 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


📦 Installation

Using npm:

npm install @daisugi/ayamari

Using pnpm:

pnpm install @daisugi/ayamari

🔝 Back to top


🔍 Overview

Ayamari improves error handling by simplifying the creation of rich, contextual errors. It enhances the legibility of exception output and provides useful features such as:

  • ✅ No stack generation by default (for performance)
  • ✅ Chained causes
  • ✅ Additional properties for extra context
  • ✅ Custom errors
  • ✅ Pretty stack traces
  • ✅ Error levels for categorization

🌍 Other Projects

Meet the ecosystem

🔝 Back to top


📜 License

MIT

Package Sidebar

Install

npm i @daisugi/ayamari

Weekly Downloads

157

Version

0.6.2

License

MIT

Unpacked Size

41 kB

Total Files

17

Last publish

Collaborators

  • sviridoff
  • mawrkus