# @flares/core

> TODO

Latest version **1.0.0-beta.32** (published 2021-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @flares/core
pnpm add @flares/core
yarn add @flares/core
bun add @flares/core
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.32 |
| Published | 2021-01-11 |
| First published | 2021-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 211.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mykyta Smirnov |
| Maintainers | vaderkos |
| Keywords | http, https, error, status, code, response, request, type, types, typed, typescript, flare, flares, raise, raising, raisable, throw, throwing, throwable, handler, handling, cases, common |

## Links

- npm: https://www.npmjs.com/package/@flares/core
- Repository: https://github.com/vaderkos/flares
- Homepage: https://github.com/vaderkos/flares#readme
- Issues: https://github.com/vaderkos/flares/issues
- npm.io page: https://npm.io/package/@flares/core

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.0-beta.32 (latest) — 2021-01-11
- 1.0.0-beta.30 — 2021-01-11
- 1.0.0-beta.29 — 2021-01-10
- 1.0.0-beta.28 — 2021-01-10
- 1.0.0-beta.27 — 2021-01-09
- 1.0.0-beta.25 — 2021-01-09
- 1.0.0-beta.24 — 2021-01-09
- 1.0.0-beta.23 — 2021-01-09
- 1.0.0-beta.22 — 2021-01-09
- 1.0.0-beta.21 — 2021-01-09
- 1.0.0-beta.20 — 2021-01-09
- 1.0.0-beta.19 — 2021-01-09
- 1.0.0-beta.18 — 2021-01-09
- 1.0.0-beta.13 — 2021-01-07
- 1.0.0-beta.12 — 2021-01-07
- … 8 more at https://npm.io/package/@flares/core/versions

## README

# 🧨🔥 Flares  - Typescript friendly status code library 


## Integrations
- express 

## Installation
Available at yarn and npm
```bash
$ npm install @flares/core
$ yarn add @flares/core
```

## Basic Flare Usage

```ts
const message = 'My message'
const data = { extra: 1 }
const cause = new Error('This is the cause')

throw new Flare(403, 'Forbidden', message, data, cause)
throw Flare(403, 'Forbidden', message, data, cause)
```

<details>
    <summary>Flare</summary>

```ts

const message = 'My message'
const data = { extra: 1 }
const cause = new Error('This error is the cause')

// Everything below is correct

throw new Flare(403, 'Forbidden', message)
throw new Flare(403, 'Forbidden', message, data)
throw new Flare(403, 'Forbidden', message, cause)
throw new Flare(403, 'Forbidden', message, data, cause)
throw new Flare(403, 'Forbidden', message, cause, data)

throw new Flare(403, 'Forbidden', data)
throw new Flare(403, 'Forbidden', data, message)
throw new Flare(403, 'Forbidden', data, cause)
throw new Flare(403, 'Forbidden', data, message, cause)
throw new Flare(403, 'Forbidden', data, cause, message)

throw new Flare(403, 'Forbidden', cause)
throw new Flare(403, 'Forbidden', cause, message)
throw new Flare(403, 'Forbidden', cause, data)
throw new Flare(403, 'Forbidden', cause, message, data)
throw new Flare(403, 'Forbidden', cause, data, message)

throw Flare(403, 'Forbidden', message)
throw Flare(403, 'Forbidden', message, data)
throw Flare(403, 'Forbidden', message, cause)
throw Flare(403, 'Forbidden', message, data, cause)
throw Flare(403, 'Forbidden', message, cause, data)

throw Flare(403, 'Forbidden', data)
throw Flare(403, 'Forbidden', data, message)
throw Flare(403, 'Forbidden', data, cause)
throw Flare(403, 'Forbidden', data, message, cause)
throw Flare(403, 'Forbidden', data, cause, message)

throw Flare(403, 'Forbidden', cause)
throw Flare(403, 'Forbidden', cause, message)
throw Flare(403, 'Forbidden', cause, data)
throw Flare(403, 'Forbidden', cause, message, data)
throw Flare(403, 'Forbidden', cause, data, message)

```
</details>

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