Socket
Socket
Sign inDemoInstall

@antv/async-hook

Package Overview
Dependencies
Maintainers
61
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/async-hook - npm Package Compare versions

Comparing version 2.2.8 to 2.2.9

32

es/index.js

@@ -1651,30 +1651,16 @@ /******************************************************************************

AsyncWaterfallHook.prototype.tapPromise = function (name, cb) {
var _this = this;
if (this.tasks.length === 0) {
this.tasks.push(function (callback) { return __awaiter(_this, void 0, void 0, function () {
var value;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, cb()];
case 1:
value = _a.sent();
callback(value ? null : false, value);
return [2];
}
this.tasks.push(function (callback) {
cb()
.then(function (value) {
callback(null, value);
});
}); });
});
}
else {
this.tasks.push(function (arg, callback) { return __awaiter(_this, void 0, void 0, function () {
var value;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, cb()];
case 1:
value = _a.sent();
callback(value ? null : false, name);
return [2];
}
this.tasks.push(function (arg, callback) {
cb(arg).then(function (v) {
callback(null, v);
});
}); });
});
}

@@ -1681,0 +1667,0 @@ };

@@ -1655,30 +1655,16 @@ 'use strict';

AsyncWaterfallHook.prototype.tapPromise = function (name, cb) {
var _this = this;
if (this.tasks.length === 0) {
this.tasks.push(function (callback) { return __awaiter(_this, void 0, void 0, function () {
var value;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, cb()];
case 1:
value = _a.sent();
callback(value ? null : false, value);
return [2];
}
this.tasks.push(function (callback) {
cb()
.then(function (value) {
callback(null, value);
});
}); });
});
}
else {
this.tasks.push(function (arg, callback) { return __awaiter(_this, void 0, void 0, function () {
var value;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, cb()];
case 1:
value = _a.sent();
callback(value ? null : false, name);
return [2];
}
this.tasks.push(function (arg, callback) {
cb(arg).then(function (v) {
callback(null, v);
});
}); });
});
}

@@ -1685,0 +1671,0 @@ };

{
"name": "@antv/async-hook",
"version": "2.2.8",
"version": "2.2.9",
"description": "the control flow for l7",

@@ -5,0 +5,0 @@ "main": "lib/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