error-foundry-js

0.1.0 • Public • Published

error-foundry-js

A minimalistic Javascript Universal Module to create custom errors.

Installation

npm install error-foundry-js --save

or

bower install error-foundry-js --save

Usage

Node

var
    ErrorFoundry = require('error-foundry-js');
 
var
    CustomError = ErrorFoundry.forge('CustomError');
 
throw new CustomError();

Browser

Globals

<script src="js/vendor/ErrorFoundry.min.js">
<script>
    var
        CustomError = ErrorFoundry.forge('CustomError');
 
    throw new CustomError();
</script> 

AMD

define([ 'ErrorFoundry' ], function (ErrorFoundry) {
    var
        CustomError = ErrorFoundry.forge('CustomError');
 
    return CustomError;
});

Readme

Keywords

Package Sidebar

Install

npm i error-foundry-js

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • adigiovanni