weak-ref-collections
Advanced tools
Comparing version 1.2.2 to 1.2.3
11
index.js
@@ -1,6 +0,1 @@ | ||
// In Node.js this is packaged into a module | ||
// In the browser exports are bound directly to the window namespace | ||
const global = | ||
typeof exports !== 'undefined' && exports !== null ? exports : this | ||
class WeakRefMap extends Map { | ||
@@ -233,3 +228,5 @@ // Delete the corresponding key when object is collected | ||
global.WeakRefMap = WeakRefMap | ||
global.WeakRefSet = WeakRefSet | ||
export { | ||
WeakRefMap, | ||
WeakRefSet | ||
} |
{ | ||
"name": "weak-ref-collections", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Iterable WeakMaps and WeakSets. Provides WeakRefMap and WeakRefSet which store values using WeakRefs and clean themselves up when garbage collected.", | ||
@@ -33,3 +33,4 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://github.com/fynyky/weak-ref-collections#readme" | ||
"homepage": "https://github.com/fynyky/weak-ref-collections#readme", | ||
"type": "module" | ||
} |
/* eslint-env mocha */ | ||
const assert = require('assert') | ||
const { WeakRefMap, WeakRefSet } = require('./index.js') | ||
import assert from 'assert' | ||
import { WeakRefMap, WeakRefSet } from './index.js' | ||
@@ -5,0 +5,0 @@ describe('WeakRefMap', () => { |
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
Yes
21943
497