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

whoops

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whoops - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

2

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/whoops",
"version": "5.0.0",
"version": "5.0.1",
"main": "src/index.js",

@@ -8,0 +8,0 @@ "author": {

@@ -14,2 +14,3 @@ # whoops

- Attach extra information, being flexible with whatever user case.
- Less than 50 lines (~500 bytes)

@@ -16,0 +17,0 @@ This library is a compromise to provide a clean API for use `Error` native class.

@@ -8,8 +8,9 @@ 'use strict'

super(raw)
const { message, ...props } = typeof raw === 'string' ? { message: raw } : raw
const mergedProps = Object.assign({}, defaults, props)
Object.keys(mergedProps).forEach(key => (this[key] = mergedProps[key]))
if (message) this.description = typeof message === 'function' ? message(this) : message
const { message, ...props } = Object.assign(
{},
defaults,
typeof raw === 'string' ? { message: raw } : raw
)
Object.keys(props).forEach(key => (this[key] = props[key]))
if (message) this.description = typeof message === 'function' ? message(props) : message
this.message = this.code ? `${this.code}, ${this.description}` : this.description

@@ -16,0 +17,0 @@ this.name = name || ErrorClass.name

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