Comparing version 1.1.0 to 1.1.1
16
index.js
'use strict'; | ||
require('loadenv')('error-cat:env'); | ||
var envIs = require('101/env-is'); | ||
@@ -97,6 +96,6 @@ var noop = require('101/noop'); | ||
// Expose default instance methods | ||
var instance = new ErrorCat(); | ||
/** | ||
* Maps exposed function names to default instance method names. | ||
* @type {object} | ||
*/ | ||
var defaultMethods = { | ||
@@ -109,2 +108,9 @@ 'middleware': 'respond', | ||
/** | ||
* Default instance used for module level functions. | ||
* @type {ErrorCat} | ||
*/ | ||
var instance = new ErrorCat(); | ||
// Expose module functions by adding immutable static methods to ErrorCat | ||
Object.keys(defaultMethods).forEach(function (name) { | ||
@@ -111,0 +117,0 @@ Object.defineProperty(ErrorCat, name, { |
{ | ||
"name": "error-cat", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A friendly feline companion that helps you create, track, and report errors.", | ||
@@ -39,3 +39,2 @@ "main": "index.js", | ||
"boom": "^2.7.1", | ||
"loadenv": "^1.0.3", | ||
"rollbar": "^0.5.3" | ||
@@ -42,0 +41,0 @@ }, |
@@ -9,2 +9,16 @@ # error-cat | ||
## Basic usage | ||
```js | ||
var ErrorCat = require('error-cat'); | ||
// Create, Log, and Report Errors | ||
var err = ErrorCat.create(404, 'Not Found'); | ||
// Log and Report Errors | ||
ErrorCat.log(someError); | ||
// Report Errors via Rollbar | ||
ErrorCat.report(anotherError); | ||
``` | ||
## Using error-cat with express | ||
@@ -11,0 +25,0 @@ Error cat was designed to be as easy as possible to use with express. Here is an |
'use strict'; | ||
require('loadenv')('error-cat:test:env'); | ||
var Lab = require('lab'); | ||
@@ -5,0 +4,0 @@ var lab = exports.lab = Lab.script(); |
16442
4
344
121
- Removedloadenv@^1.0.3
- Removed@isaacs/cliui@8.0.2(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removeddotenv@1.2.0(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedeson@0.5.0(transitive)
- Removedforeground-child@3.3.1(transitive)
- Removedglob@11.0.1(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@4.1.0(transitive)
- Removedloadenv@1.1.0(transitive)
- Removedlru-cache@11.0.2(transitive)
- Removedminimatch@10.0.1(transitive)
- Removedminipass@7.1.2(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@2.0.0(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)