Socket
Socket
Sign inDemoInstall

make-error-cause

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

make-error-cause - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/index.js

@@ -20,3 +20,3 @@ var __extends = (this && this.__extends) || function (d, b) {

BaseError.prototype.toString = function () {
return _super.prototype.toString.call(this) + (this.cause ? "\nCaused by: " + this.cause.message : '');
return _super.prototype.toString.call(this) + (this.cause ? "\nCaused by: " + this.cause.toString() : '');
};

@@ -23,0 +23,0 @@ return BaseError;

@@ -8,4 +8,7 @@ var test = require('blue-tape');

var error = new TestError('something bad', cause);
var again = new TestError('more bad', error);
t.equal(error.cause, cause);
t.equal(error.toString(), 'TestError: something bad\nCaused by: boom!');
t.equal(error.toString(), 'TestError: something bad\nCaused by: Error: boom!');
t.equal(again.cause, error);
t.equal(again.toString(), 'TestError: more bad\nCaused by: TestError: something bad\nCaused by: Error: boom!');
t.end();

@@ -12,0 +15,0 @@ });

{
"name": "make-error-cause",
"version": "1.0.0",
"version": "1.0.1",
"description": "Make your own error types, with a cause!",

@@ -17,3 +17,3 @@ "main": "dist/index.js",

"test": "npm run lint && npm run test-cov",
"prepublish": "npm run build"
"prepublish": "typings install && npm run build"
},

@@ -48,3 +48,4 @@ "repository": {

"tslint": "^3.1.1",
"typescript": "^1.7.3"
"typescript": "^1.7.3",
"typings": "^0.3.1"
},

@@ -51,0 +52,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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