@@ -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 @@ }; |
+0
-6
@@ -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 @@ }; |
+1
-1
| { | ||
| "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 @@ |
+0
-9
@@ -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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2
-60%225056
-0.72%4422
-0.58%