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

namirasoft-core

Package Overview
Dependencies
Maintainers
0
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

namirasoft-core - npm Package Compare versions

Comparing version 1.4.29 to 1.4.30

5

dist/SetTimeouService.d.ts
export declare class SetTimeouService {
private callback;
private milliseconds;
private last;
constructor(callback: () => void, milliseconds: number);
setTimeoutIfNotCalledAgain(): void;
setTimeoutIfNotCalledAgain(callback: () => void, milliseconds: number): void;
}

12

dist/SetTimeouService.js

@@ -6,13 +6,11 @@ "use strict";

class SetTimeouService {
constructor(callback, milliseconds) {
constructor() {
this.last = new Date();
this.callback = callback;
this.milliseconds = milliseconds;
}
setTimeoutIfNotCalledAgain() {
setTimeoutIfNotCalledAgain(callback, milliseconds) {
this.last = new Date();
setTimeout(() => {
if (TimeOperation_1.TimeOperation.millisecondsLater(this.milliseconds, this.last) < new Date())
this.callback();
}, this.milliseconds);
if (TimeOperation_1.TimeOperation.millisecondsLater(milliseconds, this.last) < new Date())
callback();
}, milliseconds);
}

@@ -19,0 +17,0 @@ }

@@ -11,3 +11,3 @@ {

"private": false,
"version": "1.4.29",
"version": "1.4.30",
"author": "Amir Abolhasani",

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

@@ -5,19 +5,12 @@ import { TimeOperation } from "./TimeOperation";

{
private callback: () => void;
private milliseconds: number;
private last: Date = new Date();
constructor(callback: () => void, milliseconds: number)
setTimeoutIfNotCalledAgain(callback: () => void, milliseconds: number)
{
this.callback = callback;
this.milliseconds = milliseconds;
}
setTimeoutIfNotCalledAgain()
{
this.last = new Date();
setTimeout(() =>
{
if (TimeOperation.millisecondsLater(this.milliseconds, this.last) < new Date())
this.callback();
}, this.milliseconds);
if (TimeOperation.millisecondsLater(milliseconds, this.last) < new Date())
callback();
}, milliseconds);
}
}

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