JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1260
  • Score
    100M100P100Q118823F
  • License MIT

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

Package Exports

  • @daisugi/ayamari
  • @daisugi/ayamari/src

Readme

@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