Socket
Socket
Sign inDemoInstall

@grimen/mybad

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grimen/mybad - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

5

package.json
{
"name": "@grimen/mybad",
"version": "0.2.5",
"version": "0.2.6",
"description": "My friendly error base class - for Node/JavaScript.",

@@ -38,3 +38,3 @@ "keywords": [

"engines": {
"node": ">=10"
"node": ">=12"
},

@@ -44,2 +44,3 @@ "dependencies": {

"es6-error": "^4.1.1",
"private-parts": "^0.4.1",
"util-inspect": "^0.1.8"

@@ -46,0 +47,0 @@ },

51

src/errors.js

@@ -7,2 +7,3 @@

const ExtendableError = require('es6-error')
const privateParts = require('private-parts')
const color = require('chalk')

@@ -30,2 +31,3 @@

const _ = privateParts.createKey()

@@ -38,8 +40,9 @@ /* =========================================

#error = undefined
#id = undefined
#key = undefined
#code = undefined
#message = undefined
#details = undefined
// ECMASCRIPT stage-3
// #error = undefined
// #id = undefined
// #key = undefined
// #code = undefined
// #message = undefined
// #details = undefined

@@ -107,56 +110,56 @@ constructor (...args) {

this.#error = error
this.#id = id
this.#key = key
this.#code = code
this.#message = message
this.#details = details
_(this).error = error
_(this).id = id
_(this).key = key
_(this).code = code
_(this).message = message
_(this).details = details
}
get error () {
return this.#error
return _(this).error
}
set error (value) {
this.#error = value
_(this).error = value
}
get id () {
return this.#id
return _(this).id
}
set id (value) {
this.#id = value
_(this).id = value
}
get key () {
return this.#key
return _(this).key
}
set key (value) {
this.#key = value
_(this).key = value
}
get code () {
return this.#code
return _(this).code
}
set code (value) {
this.#code = value
_(this).code = value
}
get message () {
return this.#message
return _(this).message
}
set message (value) {
this.#message = value
_(this).message = value
}
get details () {
return this.#details || {}
return _(this).details || {}
}
set details (value) {
this.#details = value
_(this).details = value
}

@@ -163,0 +166,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