@antv/async-hook
Advanced tools
Comparing version 2.2.8 to 2.2.9
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
291923
2958