@ganintegrity/gan-error
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@ganintegrity/gan-error", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "an extendable ES6 Error with support for HTTP errors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -61,4 +61,4 @@ # @ganintegrity/gan-error | ||
Objects can also be passed to the constructor and all the items in the object | ||
will be assigned to the error: | ||
Objects can also be passed to the constructor. They will be stored as `data` on | ||
the error: | ||
@@ -68,6 +68,6 @@ ```js | ||
const error = new CustomError({ message: 'foo', data: { foo: 'bar' } }); | ||
const error = new CustomError({ message: 'foo', foo: 'bar' } }); | ||
console.log(error.message); // => 'foo' | ||
console.log(error.data); // => { foo: 'bar' } | ||
console.log(error.message); // => undefined | ||
console.log(error.data); // => { message: 'foo', foo: 'bar' } | ||
``` | ||
@@ -74,0 +74,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
12717