@grimen/mybad
Advanced tools
Comparing version 0.2.5 to 0.2.6
{ | ||
"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 @@ }, |
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42045
786
4
+ Addedprivate-parts@^0.4.1
+ Addedprivate-parts@0.4.1(transitive)