JSPM

flaw

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2459
  • Score
    100M100P100Q111087F
  • License MIT

Lightweight and simple error creation in JavaScript.

Package Exports

  • flaw

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (flaw) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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
n > 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.