New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

timer-wheel

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timer-wheel - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

14

dist/cjs/rescheduling-timer-wheel.js

@@ -39,2 +39,16 @@ "use strict";

}
/**
* Unschedule an item that has been previously scheduled.
*
* @param data
*/
ReschedulingTimerWheel.prototype.unschedule = function (data) {
var current = this.items.get(data);
if (current) {
current.remove();
this.items.delete(data);
return true;
}
return false;
};
ReschedulingTimerWheel.prototype.removeNode = function (node) {

@@ -41,0 +55,0 @@ this.items.delete(node.data);

@@ -22,2 +22,16 @@ import { TimerWheel } from './timer-wheel';

}
/**
* Unschedule an item that has been previously scheduled.
*
* @param data
*/
unschedule(data) {
const current = this.items.get(data);
if (current) {
current.remove();
this.items.delete(data);
return true;
}
return false;
}
removeNode(node) {

@@ -24,0 +38,0 @@ this.items.delete(node.data);

@@ -21,2 +21,8 @@ import { TimerWheel } from './timer-wheel';

constructor();
/**
* Unschedule an item that has been previously scheduled.
*
* @param data
*/
unschedule(data: T): boolean;
protected removeNode(node: TimerNode<T>): void;

@@ -23,0 +29,0 @@ protected scheduleNode(node: TimerNode<T>): import("./handle").TimerHandle;

2

package.json
{
"name": "timer-wheel",
"version": "0.2.0",
"version": "0.3.0",
"description": "Timer wheel for managing expiration of a large amount of items",

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

@@ -28,2 +28,20 @@ import { TimerWheel } from './timer-wheel';

/**
* Unschedule an item that has been previously scheduled.
*
* @param data
*/
public unschedule(data: T): boolean {
const current = this.items.get(data);
if(current) {
current.remove();
this.items.delete(data);
return true;
}
return false;
}
protected removeNode(node: TimerNode<T>) {

@@ -30,0 +48,0 @@ this.items.delete(node.data);

Sorry, the diff of this file is not supported yet

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