We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04591d7 commit 00a1b0eCopy full SHA for 00a1b0e
lib/weak-set.js
@@ -1,3 +1,5 @@
1
+const { WeakSet } = global;
2
+
3
/**
4
* IMPORTANT: MockWeakSet intentionally omits unused methods (like delete)
5
*/
@@ -13,7 +15,5 @@ function MockWeakSet(mws = []) {
13
15
}
14
16
17
export default function MaybeWeakSet(iterable) {
- // WeakSet causes a horrible memory leak in node so just use the mock for now
- // https://github.com/nodejs/node/issues/6180
18
- return MockWeakSet(iterable);
+ return WeakSet ? new WeakSet(iterable) : MockWeakSet(iterable);
19
package.json
@@ -1,6 +1,6 @@
{
"name": "bitclock",
- "version": "0.2.0-beta.2",
+ "version": "0.2.0-beta.3",
"license": "Apache-2.0",
"repository": {
6
"type": "git",
0 commit comments