Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amaui-org/amaui-errors
Errors
https://github.com/amaui-org/amaui-errors
amaui back-end backend browser error errors front-end frontend javascript js library node nodejs typescript web
Last synced: about 2 months ago
JSON representation
Errors
- Host: GitHub
- URL: https://github.com/amaui-org/amaui-errors
- Owner: amaui-org
- License: mit
- Created: 2022-02-03T12:51:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T22:27:09.000Z (9 months ago)
- Last Synced: 2024-10-03T11:18:42.065Z (3 months ago)
- Topics: amaui, back-end, backend, browser, error, errors, front-end, frontend, javascript, js, library, node, nodejs, typescript, web
- Language: TypeScript
- Homepage: https://docs.amaui.me/library/errors
- Size: 187 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
amaui Errors
Errors
MIT license
Production ready
UMD 0.8kb gzipped
100% test cov
Browser and Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
## Getting started
### Add
```sh
yarn add @amaui/errors
```### Use
```javascript
import { AmauiError } from '@amaui/errors';
import AmauiLog from '@amaui/log';const amauiError = new AmauiError('a');
amauiError.name;
amauiError.message;
amauiError.added_at;
amauiError.stack;// AmauiError
// 'a'
// 1643893234
// 'AmauiError: a\n at eval (eval at evaluate (:3:2389), :2:31)\n at t.default.evaluate (:3:2412)\n at t.default. (:1:44)'AmauiLog.error(amauiError);
// Output
// 04-04-2014 04:04:14.141 (error):
// a
// AmauiError: a
// at eval (eval at evaluate (:3:2389), :2:31)
// at t.default.evaluate (:3:2412)
// at t.default. (:1:44)```
### Dev
Install
```sh
yarn
```Test
```sh
yarn test
```### Prod
Build
```sh
yarn build
```