Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oblivious-set

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oblivious-set - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

dist/es/index.d.ts

@@ -9,2 +9,7 @@ /**

readonly map: Map<any, any>;
/**
* Creating calls to setTimeout() is expensive,
* so we only do that if there is not timeout already open.
*/
_to: boolean;
constructor(ttl: number);

@@ -11,0 +16,0 @@ has(value: T): boolean;

15

dist/es/index.js

@@ -10,2 +10,7 @@ /**

this.map = new Map();
/**
* Creating calls to setTimeout() is expensive,
* so we only do that if there is not timeout already open.
*/
this._to = false;
}

@@ -24,5 +29,9 @@ ObliviousSet.prototype.has = function (value) {

*/
setTimeout(function () {
removeTooOldValues(_this);
}, 0);
if (!this._to) {
this._to = true;
setTimeout(function () {
_this._to = false;
removeTooOldValues(_this);
}, 0);
}
};

@@ -29,0 +38,0 @@ ObliviousSet.prototype.clear = function () {

@@ -9,2 +9,7 @@ /**

readonly map: Map<any, any>;
/**
* Creating calls to setTimeout() is expensive,
* so we only do that if there is not timeout already open.
*/
_to: boolean;
constructor(ttl: number);

@@ -11,0 +16,0 @@ has(value: T): boolean;

@@ -13,2 +13,7 @@ "use strict";

this.map = new Map();
/**
* Creating calls to setTimeout() is expensive,
* so we only do that if there is not timeout already open.
*/
this._to = false;
}

@@ -27,5 +32,9 @@ ObliviousSet.prototype.has = function (value) {

*/
setTimeout(function () {
removeTooOldValues(_this);
}, 0);
if (!this._to) {
this._to = true;
setTimeout(function () {
_this._to = false;
removeTooOldValues(_this);
}, 0);
}
};

@@ -32,0 +41,0 @@ ObliviousSet.prototype.clear = function () {

2

package.json
{
"name": "oblivious-set",
"version": "1.1.0",
"version": "1.1.1",
"description": "Like a JavaScript Set() but with a TTL for entries",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -9,2 +9,8 @@

public readonly map = new Map();
/**
* Creating calls to setTimeout() is expensive,
* so we only do that if there is not timeout already open.
*/
public _to: boolean = false;
constructor(

@@ -27,5 +33,9 @@ public readonly ttl: number

*/
setTimeout(() => {
removeTooOldValues(this);
}, 0);
if (!this._to) {
this._to = true;
setTimeout(() => {
this._to = false;
removeTooOldValues(this);
}, 0);
}
}

@@ -32,0 +42,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc