New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

error-cat

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-cat - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

27

index.js

@@ -97,16 +97,19 @@ 'use strict';

/**
* Default ErrorCat Instance.
* @type {ErrorCat}
*/
// Expose default instance methods
var instance = new ErrorCat();
/**
* Express error responder middleware.
* @type {function}
*/
Object.defineProperty(ErrorCat, 'middleware', {
value: instance.respond.bind(instance),
writable: false,
enumerable: true
var defaultMethods = {
'middleware': 'respond',
'create': 'create',
'log': 'log',
'report': 'report'
};
Object.keys(defaultMethods).forEach(function (name) {
Object.defineProperty(ErrorCat, name, {
value: instance[defaultMethods[name]].bind(instance),
writable: false,
enumerable: true
});
});
{
"name": "error-cat",
"version": "1.0.0",
"version": "1.1.0",
"description": "A friendly feline companion that helps you create, track, and report errors.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,2 +5,3 @@ # error-cat

[![devDependency Status](https://david-dm.org/Runnable/error-cat/dev-status.svg)](https://david-dm.org/Runnable/error-cat/dev-status.svg)
[![NPM](https://nodei.co/npm/error-cat.png?compact=true)](https://nodei.co/npm/error-cat)

@@ -7,0 +8,0 @@ A friendly feline companion that helps you create errors, track them, and report them via rollbar.

@@ -30,2 +30,26 @@ 'use strict';

});
it('should expose an immutable create method', function(done) {
expect(ErrorCat.create).to.be.a.function();
expect(function () {
ErrorCat.create = 'something else';
}).to.throw();
done();
});
it('should expose an immutable log method', function(done) {
expect(ErrorCat.log).to.be.a.function();
expect(function () {
ErrorCat.log = function () {};
}).to.throw();
done();
});
it('should expose an immutable report method', function(done) {
expect(ErrorCat.report).to.be.a.function();
expect(function () {
ErrorCat.report = 22;
}).to.throw();
done();
});
}); // end 'interface'

@@ -32,0 +56,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc