You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

flaw

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flaw

Lightweight and simple error creation in JavaScript.

0.1.0
latest
Source
npmnpm
Version published
Weekly downloads
1.6K
-2.56%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

error

FAQs

Package last updated on 10 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts