Comparing version 1.11.0 to 1.12.0
@@ -14,8 +14,2 @@ import { DoubleIndexedKV } from './double-indexed-kv'; | ||
} | ||
if (process.env.NODE_ENV !== 'production') { | ||
var alreadyRegistered = this.kv.getByKey(identifier); | ||
if (alreadyRegistered && alreadyRegistered !== value) { | ||
console.debug("Ambiguous class \"" + identifier + "\", provide a unique identifier."); | ||
} | ||
} | ||
this.kv.set(identifier, value); | ||
@@ -22,0 +16,0 @@ }; |
@@ -17,8 +17,2 @@ "use strict"; | ||
} | ||
if (process.env.NODE_ENV !== 'production') { | ||
var alreadyRegistered = this.kv.getByKey(identifier); | ||
if (alreadyRegistered && alreadyRegistered !== value) { | ||
console.debug("Ambiguous class \"" + identifier + "\", provide a unique identifier."); | ||
} | ||
} | ||
this.kv.set(identifier, value); | ||
@@ -25,0 +19,0 @@ }; |
{ | ||
"version": "1.11.0", | ||
"version": "1.12.0", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -19,10 +19,2 @@ import { Registry } from './registry'; | ||
const warnSpy = jest.spyOn(console, 'debug'); | ||
registry.register(class Car {}); | ||
expect(warnSpy).toHaveBeenCalledTimes(1); | ||
expect(warnSpy.mock.calls[0][0]).toContain( | ||
'Ambiguous class "Car", provide a unique identifier.' | ||
); | ||
registry.register(class Car {}, 'car2'); | ||
@@ -29,0 +21,0 @@ |
@@ -17,11 +17,2 @@ import { DoubleIndexedKV } from './double-indexed-kv'; | ||
if (process.env.NODE_ENV !== 'production') { | ||
const alreadyRegistered = this.kv.getByKey(identifier); | ||
if (alreadyRegistered && alreadyRegistered !== value) { | ||
console.debug( | ||
`Ambiguous class "${identifier}", provide a unique identifier.` | ||
); | ||
} | ||
} | ||
this.kv.set(identifier, value); | ||
@@ -28,0 +19,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
0
225056
4422