reference-map
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -46,3 +46,3 @@ module.exports = class ReferanceMap { | ||
delete (ref) { | ||
delete this._map[ref][this.intRefProp] | ||
delete this._map[ref].obj[this.intRefProp] | ||
delete this._map[ref] | ||
@@ -56,3 +56,3 @@ } | ||
this._map.forEach(el => { | ||
delete el[this.intRefProp] | ||
delete el.obj[this.intRefProp] | ||
}) | ||
@@ -59,0 +59,0 @@ this._map = [] |
{ | ||
"name": "reference-map", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "This is a simple determinstic map that maps POJOs to an integer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -53,1 +53,11 @@ const tape = require('tape') | ||
}) | ||
tape('failures', t => { | ||
const referanceMap = new ReferanceMap() | ||
const buf = Buffer.from('hello') | ||
referanceMap.add(buf) | ||
referanceMap.clear() | ||
const ref = referanceMap.add(buf) | ||
t.deepEquals(referanceMap.get(ref), buf) | ||
t.end() | ||
}) |
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
66219
547