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

@jcoreio/async-throttle

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jcoreio/async-throttle - npm Package Compare versions

Comparing version 1.4.4 to 1.4.5

4

es/index.js

@@ -72,5 +72,5 @@ "use strict";

async function wrapper(...args) {
function wrapper(...args) {
nextArgs = nextArgs ? getNextArgs(nextArgs, args) : args;
if (!nextArgs) throw new Error('unexpected error: nextArgs is null');
if (!nextArgs) return Promise.reject(new Error('unexpected error: nextArgs is null'));
if (nextInvocation) return nextInvocation;

@@ -77,0 +77,0 @@ return nextInvocation = (delay || Promise.resolve()).then(invoke);

@@ -137,48 +137,10 @@ "use strict";

function wrapper() {
return _wrapper.apply(this, arguments);
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
function _wrapper() {
_wrapper = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
var _len,
args,
_key,
_args4 = arguments;
return _regenerator["default"].wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
for (_len = _args4.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = _args4[_key];
}
nextArgs = nextArgs ? getNextArgs(nextArgs, args) : args;
if (nextArgs) {
_context4.next = 4;
break;
}
throw new Error('unexpected error: nextArgs is null');
case 4:
if (!nextInvocation) {
_context4.next = 6;
break;
}
return _context4.abrupt("return", nextInvocation);
case 6:
return _context4.abrupt("return", nextInvocation = (delay || Promise.resolve()).then(invoke));
case 7:
case "end":
return _context4.stop();
}
}
}, _callee4);
}));
return _wrapper.apply(this, arguments);
nextArgs = nextArgs ? getNextArgs(nextArgs, args) : args;
if (!nextArgs) return Promise.reject(new Error('unexpected error: nextArgs is null'));
if (nextInvocation) return nextInvocation;
return nextInvocation = (delay || Promise.resolve()).then(invoke);
}

@@ -185,0 +147,0 @@

{
"name": "@jcoreio/async-throttle",
"version": "1.4.4",
"version": "1.4.5",
"description": "throttle async and promise-returning functions. Other packages don't do it right.",

@@ -5,0 +5,0 @@ "main": "index.js",

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