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

@randajan/jet-core

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@randajan/jet-core - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

14

dist/index.js

@@ -662,3 +662,3 @@ var __defProp = Object.defineProperty;

// src/jet/buffer.js
var buffer = (processQueue, bufferMs = 100, maxQueueSize = 100) => {
var buffer = (processQueue, bufferMs = 100, maxQueueMs = 0, maxQueueSize = 0) => {
if (!jet.isRunnable(processQueue)) {

@@ -668,5 +668,8 @@ throw new Error("jet.buffer(...) require function as a first argument");

bufferMs = Math.max(0, Number.jet.to(bufferMs));
maxQueueMs = Math.max(0, Number.jet.to(maxQueueMs));
maxQueueSize = Math.max(0, Number.jet.to(maxQueueSize));
let int, queue = [];
let intA, intB, queue = [];
const execute = (_) => {
clearTimeout(intA);
clearTimeout(intB);
const q = queue;

@@ -677,3 +680,3 @@ queue = [];

return (...args) => {
clearTimeout(int);
clearTimeout(intA);
if (maxQueueSize && queue.length >= maxQueueSize) {

@@ -683,3 +686,6 @@ return execute();

queue.push(args);
int = setTimeout(execute, bufferMs);
intA = setTimeout(execute, bufferMs);
if (maxQueueMs > bufferMs && queue.length === 1) {
intB = setTimeout(execute, maxQueueMs);
}
};

@@ -686,0 +692,0 @@ };

{
"name": "@randajan/jet-core",
"version": "3.3.0",
"version": "3.3.1",
"description": "Ecosystem of types and related usefull tools.",

@@ -5,0 +5,0 @@ "repository": "randajan/jet-core",

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