@deboxsoft/module-core
Advanced tools
Comparing version 1.8.0-3 to 1.8.0-4
@@ -43,9 +43,9 @@ 'use strict'; | ||
this.name = "ServiceNotFoundError"; | ||
this.normalizedIdentifier = "<UNKNOWN_IDENTIFIER>"; | ||
if (typeof identifier === "string") { | ||
this.normalizedIdentifier = identifier; | ||
this.identifier = "<UNKNOWN_IDENTIFIER>"; | ||
if (typeof identifier === "string" || typeof identifier === "symbol") { | ||
this.identifier = identifier; | ||
} | ||
} | ||
get message() { | ||
return `Service with "${this.normalizedIdentifier}" identifier was not found in the container. Register it before usage via explicitly calling the "Container.set"`; | ||
return `Service with "${this.identifier}" identifier was not found in the container. Register it before usage via explicitly calling the "Container.set"`; | ||
} | ||
@@ -60,3 +60,3 @@ } | ||
has(identifier) { | ||
return !!this.metadataMap.has(identifier); | ||
return this.metadataMap.has(identifier); | ||
} | ||
@@ -63,0 +63,0 @@ get(identifier) { |
10
index.js
@@ -16,9 +16,9 @@ import * as changeCase from 'change-case'; | ||
this.name = "ServiceNotFoundError"; | ||
this.normalizedIdentifier = "<UNKNOWN_IDENTIFIER>"; | ||
if (typeof identifier === "string") { | ||
this.normalizedIdentifier = identifier; | ||
this.identifier = "<UNKNOWN_IDENTIFIER>"; | ||
if (typeof identifier === "string" || typeof identifier === "symbol") { | ||
this.identifier = identifier; | ||
} | ||
} | ||
get message() { | ||
return `Service with "${this.normalizedIdentifier}" identifier was not found in the container. Register it before usage via explicitly calling the "Container.set"`; | ||
return `Service with "${this.identifier}" identifier was not found in the container. Register it before usage via explicitly calling the "Container.set"`; | ||
} | ||
@@ -33,3 +33,3 @@ } | ||
has(identifier) { | ||
return !!this.metadataMap.has(identifier); | ||
return this.metadataMap.has(identifier); | ||
} | ||
@@ -36,0 +36,0 @@ get(identifier) { |
{ | ||
"name": "@deboxsoft/module-core", | ||
"version": "1.8.0-3", | ||
"version": "1.8.0-4", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -6,5 +6,5 @@ import { DeboxError } from "../../Error"; | ||
/** Normalized identifier name used in the error message. */ | ||
private readonly normalizedIdentifier; | ||
private readonly identifier; | ||
get message(): string; | ||
constructor(identifier: Identifier); | ||
} |
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
44271