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

@proscom/ui-react

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@proscom/ui-react - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

8

lib/es/utils/SingleTimeoutManager.d.ts

@@ -1,7 +0,1 @@

export declare class SingleTimeoutManager {
timeout: any;
set(cb: (() => void) | null, time: number): void;
setDelay(time: number): void;
clear(): void;
active(): any;
}
export { SingleTimeoutManager } from '@proscom/ui-utils';

@@ -1,29 +0,2 @@

var SingleTimeoutManager = /** @class */ (function () {
function SingleTimeoutManager() {
this.timeout = null;
}
SingleTimeoutManager.prototype.set = function (cb, time) {
var _this = this;
if (this.timeout)
clearTimeout(this.timeout);
this.timeout = setTimeout(function () {
_this.timeout = null;
cb === null || cb === void 0 ? void 0 : cb();
}, time);
};
SingleTimeoutManager.prototype.setDelay = function (time) {
return this.set(null, time);
};
SingleTimeoutManager.prototype.clear = function () {
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = null;
}
};
SingleTimeoutManager.prototype.active = function () {
return this.timeout;
};
return SingleTimeoutManager;
}());
export { SingleTimeoutManager };
export { SingleTimeoutManager } from '@proscom/ui-utils';
//# sourceMappingURL=SingleTimeoutManager.js.map

@@ -1,7 +0,1 @@

export declare class SingleTimeoutManager {
timeout: any;
set(cb: (() => void) | null, time: number): void;
setDelay(time: number): void;
clear(): void;
active(): any;
}
export { SingleTimeoutManager } from '@proscom/ui-utils';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SingleTimeoutManager = void 0;
var SingleTimeoutManager = /** @class */ (function () {
function SingleTimeoutManager() {
this.timeout = null;
}
SingleTimeoutManager.prototype.set = function (cb, time) {
var _this = this;
if (this.timeout)
clearTimeout(this.timeout);
this.timeout = setTimeout(function () {
_this.timeout = null;
cb === null || cb === void 0 ? void 0 : cb();
}, time);
};
SingleTimeoutManager.prototype.setDelay = function (time) {
return this.set(null, time);
};
SingleTimeoutManager.prototype.clear = function () {
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = null;
}
};
SingleTimeoutManager.prototype.active = function () {
return this.timeout;
};
return SingleTimeoutManager;
}());
exports.SingleTimeoutManager = SingleTimeoutManager;
var ui_utils_1 = require("@proscom/ui-utils");
Object.defineProperty(exports, "SingleTimeoutManager", { enumerable: true, get: function () { return ui_utils_1.SingleTimeoutManager; } });
//# sourceMappingURL=SingleTimeoutManager.js.map

7

package.json
{
"name": "@proscom/ui-react",
"version": "0.0.3",
"version": "0.0.4",
"description": "Proscom React utilities",

@@ -35,2 +35,5 @@ "author": "Andrew Starostin <a.starostin@proscom.ru>",

},
"dependencies": {
"@proscom/ui-utils": "^0.0.4"
},
"peerDependencies": {

@@ -42,3 +45,3 @@ "react": "^16.8.0 || ^17.0.0"

},
"gitHead": "c9f33be94a9fa7ae0448e3d57ed3d811efc81660"
"gitHead": "d5f9dac37bba96f823aba7ba26f6de7bc17755a0"
}

@@ -1,26 +0,1 @@

export class SingleTimeoutManager {
timeout: any = null;
public set(cb: (() => void) | null, time: number) {
if (this.timeout) clearTimeout(this.timeout);
this.timeout = setTimeout(() => {
this.timeout = null;
cb?.();
}, time);
}
public setDelay(time: number) {
return this.set(null, time);
}
public clear() {
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = null;
}
}
public active() {
return this.timeout;
}
}
export { SingleTimeoutManager } from '@proscom/ui-utils';

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