@cloudflare/util-async
Advanced tools
Comparing version 1.2.12 to 1.2.13
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.2.13](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-async@1.2.12...@cloudflare/util-async@1.2.13) (2021-10-21) | ||
**Note:** Version bump only for package @cloudflare/util-async | ||
## [1.2.12](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-async@1.2.11...@cloudflare/util-async@1.2.12) (2021-04-23) | ||
@@ -8,0 +16,0 @@ |
export default function parallel(funcs, callback) { | ||
var results = []; | ||
var index = 0; | ||
var errored = false; | ||
const results = []; | ||
let index = 0; | ||
let errored = false; | ||
var _loop = function _loop(i) { | ||
var func = funcs[i]; | ||
var called = false; | ||
func(function (error, result) { | ||
for (let i = 0; i < funcs.length; i++) { | ||
let func = funcs[i]; | ||
let called = false; | ||
func((error, result) => { | ||
if (called) { | ||
@@ -32,7 +32,3 @@ throw new Error('A callback can only be called once in parallel()'); | ||
}); | ||
}; | ||
for (var i = 0; i < funcs.length; i++) { | ||
_loop(i); | ||
} | ||
} |
export default function series(funcs, callback) { | ||
var results = []; | ||
var index = 0; | ||
const results = []; | ||
let index = 0; | ||
function next() { | ||
var func = funcs[index++]; | ||
const func = funcs[index++]; | ||
@@ -13,4 +13,4 @@ if (!func) { | ||
var called = false; | ||
func(function (error, result) { | ||
let called = false; | ||
func((error, result) => { | ||
if (called) { | ||
@@ -17,0 +17,0 @@ throw new Error('A callback can only be called once in series()'); |
{ | ||
"name": "@cloudflare/util-async", | ||
"description": "Cloudflare Async Util", | ||
"version": "1.2.12", | ||
"version": "1.2.13", | ||
"main": "lib/index.js", | ||
@@ -10,3 +10,3 @@ "module": "es/index.js", | ||
"publishConfig": { | ||
"registry": "http://registry.npmjs.org/", | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
@@ -24,3 +24,3 @@ }, | ||
}, | ||
"gitHead": "3b74aee5f2437d3981de017126c02cd66ffbeb2d" | ||
"gitHead": "9a93b982519e49f889a51a16b9f5766be70c443e" | ||
} |
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
10706
137