0.4.0 โ€ข Published 4 months ago

@daisugi/ayamari v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@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

:top: 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

:top: back to top

License

MIT