Comparing version
@@ -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
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
1
-66.67%225056
-0.72%4422
-0.58%