Travis build: 903 [cron]
This commit is contained in:
File diff suppressed because one or more lines are too long
3997
coverage/lcov.info
3997
coverage/lcov.info
File diff suppressed because it is too large
Load Diff
4
dist/_30s.es5.js
vendored
4
dist/_30s.es5.js
vendored
@ -334,9 +334,11 @@
|
|||||||
};
|
};
|
||||||
var chainAsync = function chainAsync(fns) {
|
var chainAsync = function chainAsync(fns) {
|
||||||
var curr = 0;
|
var curr = 0;
|
||||||
|
var last = fns[fns.length - 1];
|
||||||
|
|
||||||
var next = function next() {
|
var next = function next() {
|
||||||
return fns[curr++](next);
|
var fn = fns[curr++];
|
||||||
|
fn === last ? fn() : fn(next);
|
||||||
};
|
};
|
||||||
|
|
||||||
next();
|
next();
|
||||||
|
|||||||
2
dist/_30s.es5.min.js
vendored
2
dist/_30s.es5.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/_30s.esm.js
vendored
6
dist/_30s.esm.js
vendored
@ -108,7 +108,11 @@ const capitalizeEveryWord = str => str.replace(/\b[a-z]/g, char => char.toUpperC
|
|||||||
const castArray = val => (Array.isArray(val) ? val : [val]);
|
const castArray = val => (Array.isArray(val) ? val : [val]);
|
||||||
const chainAsync = fns => {
|
const chainAsync = fns => {
|
||||||
let curr = 0;
|
let curr = 0;
|
||||||
const next = () => fns[curr++](next);
|
const last = fns[fns.length - 1];
|
||||||
|
const next = () => {
|
||||||
|
const fn = fns[curr++];
|
||||||
|
fn === last ? fn() : fn(next);
|
||||||
|
};
|
||||||
next();
|
next();
|
||||||
};
|
};
|
||||||
const chunk = (arr, size) =>
|
const chunk = (arr, size) =>
|
||||||
|
|||||||
6
dist/_30s.js
vendored
6
dist/_30s.js
vendored
@ -114,7 +114,11 @@
|
|||||||
const castArray = val => (Array.isArray(val) ? val : [val]);
|
const castArray = val => (Array.isArray(val) ? val : [val]);
|
||||||
const chainAsync = fns => {
|
const chainAsync = fns => {
|
||||||
let curr = 0;
|
let curr = 0;
|
||||||
const next = () => fns[curr++](next);
|
const last = fns[fns.length - 1];
|
||||||
|
const next = () => {
|
||||||
|
const fn = fns[curr++];
|
||||||
|
fn === last ? fn() : fn(next);
|
||||||
|
};
|
||||||
next();
|
next();
|
||||||
};
|
};
|
||||||
const chunk = (arr, size) =>
|
const chunk = (arr, size) =>
|
||||||
|
|||||||
@ -370,7 +370,7 @@
|
|||||||
"archived": false
|
"archived": false
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"hash": "8c245a7fc94edffaf5cae4c28f37ed2e989772a9663a5f5bce98147f708a712e"
|
"hash": "ae8f373cb6c661896ce4256e9f8a2f7f9c14f1699651d366af038f66a938f70e"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3348,7 +3348,7 @@
|
|||||||
"archived": false
|
"archived": false
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"hash": "4815876fd6dbb17ad34c0d8918e7a72d837104f9beee7dc51b0fa73057b9e83e"
|
"hash": "0b04f5fe668888db0dc360535cd999669258019f0682eb6e4ad3a1164e408d13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3720,7 +3720,7 @@
|
|||||||
"archived": false
|
"archived": false
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"hash": "ec9cb9384817f84cf0bacd62a23b69b2304fa2cf0352b16d3950b21d48c04f11"
|
"hash": "536833a64ce0c000b82327ed1bb9bcb82e35b237f75aefcca0e0d2def4e9cb63"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -534,9 +534,9 @@
|
|||||||
"fileName": "chainAsync.md",
|
"fileName": "chainAsync.md",
|
||||||
"text": "Chains asynchronous functions.\n\nLoop through an array of functions containing asynchronous events, calling `next` when each asynchronous event has completed.",
|
"text": "Chains asynchronous functions.\n\nLoop through an array of functions containing asynchronous events, calling `next` when each asynchronous event has completed.",
|
||||||
"codeBlocks": {
|
"codeBlocks": {
|
||||||
"es6": "const chainAsync = fns => {\n let curr = 0;\n const next = () => fns[curr++](next);\n next();\n};",
|
"es6": "const chainAsync = fns => {\n let curr = 0;\n const last = fns[fns.length - 1];\n const next = () => {\n const fn = fns[curr++];\n fn === last ? fn() : fn(next);\n };\n next();\n};",
|
||||||
"es5": "var chainAsync = function chainAsync(fns) {\n var curr = 0;\n\n var next = function next() {\n return fns[curr++](next);\n };\n\n next();\n};",
|
"es5": "var chainAsync = function chainAsync(fns) {\n var curr = 0;\n var last = fns[fns.length - 1];\n\n var next = function next() {\n var fn = fns[curr++];\n fn === last ? fn() : fn(next);\n };\n\n next();\n};",
|
||||||
"example": "chainAsync([\n next => {\n console.log('0 seconds');\n setTimeout(next, 1000);\n },\n next => {\n console.log('1 second');\n }\n]);"
|
"example": "chainAsync([\n next => {\n console.log('0 seconds');\n setTimeout(next, 1000);\n },\n next => {\n console.log('1 second');\n setTimeout(next, 1000);\n },\n () => {\n console.log('2 second');\n }\n]);"
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
"function",
|
"function",
|
||||||
@ -545,7 +545,7 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"hash": "8c245a7fc94edffaf5cae4c28f37ed2e989772a9663a5f5bce98147f708a712e"
|
"hash": "ae8f373cb6c661896ce4256e9f8a2f7f9c14f1699651d366af038f66a938f70e"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -4930,7 +4930,7 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"hash": "4815876fd6dbb17ad34c0d8918e7a72d837104f9beee7dc51b0fa73057b9e83e"
|
"hash": "0b04f5fe668888db0dc360535cd999669258019f0682eb6e4ad3a1164e408d13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -5477,7 +5477,7 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"hash": "ec9cb9384817f84cf0bacd62a23b69b2304fa2cf0352b16d3950b21d48c04f11"
|
"hash": "536833a64ce0c000b82327ed1bb9bcb82e35b237f75aefcca0e0d2def4e9cb63"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -208,7 +208,11 @@
|
|||||||
"body": [
|
"body": [
|
||||||
"const chainAsync = fns => {",
|
"const chainAsync = fns => {",
|
||||||
" let curr = 0;",
|
" let curr = 0;",
|
||||||
" const next = () => fns[curr++](next);",
|
" const last = fns[fns.length - 1];",
|
||||||
|
" const next = () => {",
|
||||||
|
" const fn = fns[curr++];",
|
||||||
|
" fn === last ? fn() : fn(next);",
|
||||||
|
" };",
|
||||||
" next();",
|
" next();",
|
||||||
"};"
|
"};"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user