Comparing version 7.2.0 to 7.2.1
{ | ||
"name": "error", | ||
"version": "7.2.0", | ||
"version": "7.2.1", | ||
"description": "Custom errors", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -10,2 +10,3 @@ 'use strict'; | ||
var ServerListenError = WrappedError({ | ||
name: 'SomeError', | ||
message: 'server: {causeMessage}', | ||
@@ -12,0 +13,0 @@ type: 'server.listen-failed', |
@@ -14,2 +14,4 @@ 'use strict'; | ||
var FUNCTION_FIELD_WHITELIST = Object.getOwnPropertyNames(WrappedError) | ||
module.exports = WrappedError; | ||
@@ -31,4 +33,10 @@ | ||
var copyArgs = {} | ||
extend(copyArgs, options) | ||
for (var i = 0; i < FUNCTION_FIELD_WHITELIST.length; i++) { | ||
delete copyArgs[FUNCTION_FIELD_WHITELIST[i]] | ||
} | ||
var createTypedError = TypedError(options); | ||
extend(createError, options); | ||
extend(createError, copyArgs); | ||
createError._name = options.name; | ||
@@ -35,0 +43,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
20018
432