Nocturnal Practitioners of Magic
Wondering what’s next for npm?Check out our public roadmap! »

flaw

0.1.0 • Public • Published

Flaw

Build Status

Lightweight and simple error creation in JavaScript.

browser support

Example

var flaw = require('flaw')
 
// Simple error creation
var ParsingError = flaw('ParsingError')
throw ParsingError('Unknow token at...', { line: 1 })
 
// Raising errors in an expression
> 0 ? m / n
      : raise(flaw('DivideByZero', 'Can\'t divide by 0'))

Installation

$ npm install flaw

Documentation

$ npm install -g calliope
$ calliope build

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

Licence

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

Keywords

none

Install

npm i flaw

DownloadsWeekly Downloads

2,578

Version

0.1.0

License

none

Last publish

Collaborators

  • avatar