# flaw

> Lightweight and simple error creation in JavaScript.

Latest version **0.1.0** (published 2013-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install flaw
pnpm add flaw
yarn add flaw
bun add flaw
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-03-10 |
| First published | 2013-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Quildreen "Sorella" Motta |
| Maintainers | killdream |
| Keywords | error, handling, exception |

## Links

- npm: https://www.npmjs.com/package/flaw
- Repository: https://github.com/killdream/flaw
- npm.io page: https://npm.io/package/flaw

## Recent versions

- 0.1.0 (latest) — 2013-03-10

## README

Flaw
====

[![Build Status](https://travis-ci.org/killdream/flaw.png)](https://travis-ci.org/killdream/flaw)

Lightweight and simple error creation in JavaScript.

[![browser support](http://ci.testling.com/killdream/flaw.png)](http://ci.testling.com/killdream/flaw)


### Example

```js
var flaw = require('flaw')

// Simple error creation
var ParsingError = flaw('ParsingError')
throw ParsingError('Unknow token at...', { line: 1 })

// Raising errors in an expression
n > 0 ? m / n
      : raise(flaw('DivideByZero', 'Can\'t divide by 0'))
```


### Installation

```bash
$ npm install flaw
```


### Documentation

```bash
$ npm install -g calliope
$ calliope build
```

Then open `docs/api/index.html` in your browser.


### Licence

MIT/X11. ie.: do whatever you want.

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