Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

failure

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

failure - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

index.js

@@ -42,3 +42,3 @@ 'use strict';

if (props) for (var prop in props) {
if (!(prop in err) && props.hasOwnProperty(prop)) {
if (!(prop in err) && has.call(props, prop)) {
err[prop] = props[prop];

@@ -45,0 +45,0 @@ }

{
"name": "failure",
"version": "1.1.0",
"version": "1.1.1",
"description": "Easily generate \"custom\" error objects with addition properties which can be stringfied with JSON.stringify",

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

@@ -25,2 +25,15 @@ describe('failure', function () {

it('accepts Object.create(null)', function () {
var obj = Object.create(null)
, err;
obj.foo = 'bar';
obj.message = 'hi';
err = failure(new Error('what'), obj);
assume(err.message).equals('what');
assume(err.foo).equals('bar');
});
describe('#toJSON', function () {

@@ -27,0 +40,0 @@ it('adds the `toJSON` function', function () {

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