@cloudflare/util-async
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -6,3 +6,11 @@ # Change Log | ||
<a name="1.0.8"></a> | ||
<a name="1.0.9"></a> | ||
## [1.0.9](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-async@1.0.8...@cloudflare/util-async@1.0.9) (2018-09-21) | ||
**Note:** Version bump only for package @cloudflare/util-async | ||
<a name="1.0.8"></a> | ||
## [1.0.8](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-async@1.0.7...@cloudflare/util-async@1.0.8) (2018-06-14) | ||
@@ -15,3 +23,3 @@ | ||
<a name="1.0.7"></a> | ||
<a name="1.0.7"></a> | ||
@@ -18,0 +26,0 @@ ## [1.0.7](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-async@1.0.4...@cloudflare/util-async@1.0.7) (2018-06-07) |
import parallel from './parallel'; | ||
import series from './series'; | ||
export { parallel, series }; |
export default function parallel(funcs, callback) { | ||
var results = []; | ||
var index = 0; | ||
@@ -10,3 +9,2 @@ var errored = false; | ||
var called = false; | ||
func(function (error, result) { | ||
@@ -13,0 +11,0 @@ if (called) { |
@@ -14,3 +14,2 @@ export default function series(funcs, callback) { | ||
var called = false; | ||
func(function (error, result) { | ||
@@ -17,0 +16,0 @@ if (called) { |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,15 +6,19 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports.series = exports.parallel = undefined; | ||
Object.defineProperty(exports, "parallel", { | ||
enumerable: true, | ||
get: function get() { | ||
return _parallel.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "series", { | ||
enumerable: true, | ||
get: function get() { | ||
return _series.default; | ||
} | ||
}); | ||
var _parallel = require('./parallel'); | ||
var _parallel = _interopRequireDefault(require("./parallel")); | ||
var _parallel2 = _interopRequireDefault(_parallel); | ||
var _series = _interopRequireDefault(require("./series")); | ||
var _series = require('./series'); | ||
var _series2 = _interopRequireDefault(_series); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.parallel = _parallel2.default; | ||
exports.series = _series2.default; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -7,13 +7,12 @@ Object.defineProperty(exports, "__esModule", { | ||
exports.default = parallel; | ||
function parallel(funcs, callback) { | ||
const results = []; | ||
var results = []; | ||
var index = 0; | ||
var errored = false; | ||
let index = 0; | ||
let errored = false; | ||
for (let i = 0; i < funcs.length; i++) { | ||
let func = funcs[i]; | ||
let called = false; | ||
func((error, result) => { | ||
var _loop = function _loop(i) { | ||
var func = funcs[i]; | ||
var called = false; | ||
func(function (error, result) { | ||
if (called) { | ||
@@ -41,3 +40,7 @@ throw new Error('A callback can only be called once in parallel()'); | ||
}); | ||
}; | ||
for (var i = 0; i < funcs.length; i++) { | ||
_loop(i); | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", { | ||
exports.default = series; | ||
function series(funcs, callback) { | ||
const results = []; | ||
let index = 0; | ||
var results = []; | ||
var index = 0; | ||
function next() { | ||
const func = funcs[index++]; | ||
var func = funcs[index++]; | ||
@@ -20,5 +21,4 @@ if (!func) { | ||
let called = false; | ||
func((error, result) => { | ||
var called = false; | ||
func(function (error, result) { | ||
if (called) { | ||
@@ -25,0 +25,0 @@ throw new Error('A callback can only be called once in series()'); |
{ | ||
"name": "@cloudflare/util-async", | ||
"description": "Cloudflare Async Util", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "es/index.js", |
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
8362
197