# @amaui/errors

> Errors

Latest version **1.0.111** (published 2022-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @amaui/errors
pnpm add @amaui/errors
yarn add @amaui/errors
bun add @amaui/errors
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.111 |
| Published | 2022-06-17 |
| First published | 2022-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.0.0 |
| Dependencies | 1 |
| Unpacked size | 27.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lazar |
| Maintainers | lazareric |
| Keywords | error, errors, frontend, front-end, backend, back-end, web, browser, javascript, js, typescript, node, nodejs, amaui, library |

## Links

- npm: https://www.npmjs.com/package/@amaui/errors
- Repository: https://github.com/amaui-org/amaui-errors
- Homepage: https://github.com/amaui-org/amaui-errors#readme
- Issues: https://github.com/amaui-org/amaui-errors/issues
- npm.io page: https://npm.io/package/@amaui/errors

## Dependencies (1)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.18.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.111 (latest) — 2022-06-17
- 1.0.11 — 2022-03-08
- 1.0.1 — 2022-03-08
- 1.0.0 — 2022-02-03

## README

</br>
</br>

<p align='center'>
  <a target='_blank' rel='noopener noreferrer' href='#'>
    <img width='auto' height='84' src='https://raw.githubusercontent.com/onesy-me/onesy/refs/heads/main/utils/images/logo.png' alt='onesy logo' />
  </a>
</p>

<h1 align='center'>onesy Errors</h1>

<h3 align='center'>
  <sub>MIT license&nbsp;&nbsp;&nbsp;&nbsp;</sub>
  <sub>Production ready&nbsp;&nbsp;&nbsp;&nbsp;</sub>
  <sub>UMD 0.8kb gzipped&nbsp;&nbsp;&nbsp;&nbsp;</sub>
  <sub>100% test cov&nbsp;&nbsp;&nbsp;&nbsp;</sub>
  <sub>Browser and Nodejs</sub>
</h3>

<p align='center'>
    <sub>Very simple code&nbsp;&nbsp;&nbsp;&nbsp;</sub>
    <sub>Modern code&nbsp;&nbsp;&nbsp;&nbsp;</sub>
    <sub>Junior friendly&nbsp;&nbsp;&nbsp;&nbsp;</sub>
    <sub>Typescript&nbsp;&nbsp;&nbsp;&nbsp;</sub>
    <sub>Made with :yellow_heart:</sub>
</p>

<br />

### Add

```sh
yarn add @onesy/errors
```

### Use

```javascript
  import { OnesyError } from '@onesy/errors';
  import OnesyLog from '@onesy/log';

  const onesyError = new OnesyError('a');

  onesyError.name;
  onesyError.message;
  onesyError.added_at;
  onesyError.stack;

  // OnesyError
  // 'a'
  // 1643893234
  // 'OnesyError: a\n    at eval (eval at evaluate (:3:2389), <anonymous>:2:31)\n    at t.default.evaluate (<anonymous>:3:2412)\n    at t.default.<anonymous> (<anonymous>:1:44)'

  OnesyLog.error(onesyError);

  // Output

    // 04-04-2014 04:04:14.141 (error):

    // a

    // OnesyError: a
    //    at eval (eval at evaluate (:3:2389), <anonymous>:2:31)
    //    at t.default.evaluate (<anonymous>:3:2412)
    //    at t.default.<anonymous> (<anonymous>:1:44)

```

### Dev

Install

```sh
yarn
```

Test

```sh
yarn test
```

### Prod

Build

```sh
yarn build
```

---
_Source: https://npm.io/package/@amaui/errors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
