This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▒██████████▒ | |
███▓▓██▓▓██▓ | |
███▓▓▓▓████▓ | |
███▓▓██▓▓██▓ | |
░█████████░▒██████████▒░█████████░ | |
██▓▓██▓▓██░▒▓▓▓▓▓▓▓▓▓▓▒░██▓▓██████ | |
█▒██▓▓▓▓▓▓██░▒▒▒▒▒▒▒▒▒▒▒▒░██▓▓██████▒█ | |
█ ▒██▓▓██▓▓██░▓██████████▓░██▓▓▓▓▓▓██▒ █ | |
█ ▒██████████░███████▓▓███░██████████░ █ | |
█ ░▓▓▓▓▓▓▓▓▓▓░███▓▓██▓▓███░▓▓▓▓▓▓▓▓▓▓░ █ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
░░░░░░░░░░░░░░░░ | |
░████████████████████░ | |
░████▓▓▓██████▓▓▓████░ | |
░████▓▓▓███▓▓▓███████░ | |
░████▓▓▓▓▓▓██████████░ | |
░████▓▓▓███▓▓▓███████░ | |
░████▓▓▓██████▓▓▓████░ | |
░████████████████▓░▒████████████████████▒░▓████████████████░ | |
░█████▓▓▓█████▓▓▓████▒▓▓████████████████▓▓▒█████▓▓▓███████████▓░ | |
░█████▓▓▓█████▓▓▓████▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒█████▓▓▓███████████▓░ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
░░░░░░░░░░░░░░░░ | |
░████████████████████░ | |
░█████████▓▓█████████░ | |
░███████▓▓▓▓▓▓███████░ | |
░████▓▓▓▓▓▓▓▓▓▓▓█████░ | |
░████▓▓▓▓▓▓▓▓▓▓▓█████░ | |
░████████████████████░ | |
░████████████████▓░▒████████████████████▒░▓████████████████░ | |
░████████████████████▒▓▓████████████████▓▒▒███████████████████▓░ | |
░█████████▓▓▓▓███████▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒███████▓▓▓▓████████▓░ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
░▒███ ███░ | |
░▒▒█▓▒ ▒▒▓█░░ | |
░░▒██▓▓▓ ▓▓▓▓██░░ | |
░▒█▓▒░ ░▓█▒░ | |
░▒█▓▒░ ░▓█▒░ | |
░▒█▓▒▒ ░▒▓█▒░ | |
░▒██▓▓▒▒▒▒▒▒▒▒▒▒▓▓██░ | |
░░▒▒███████████████████▓░ | |
░░▒▓█████████████████████▓░ | |
░▒▒▓██████████████████████▓▒░ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▓▓▓▓▓ ▓▓▓▓▓ | |
▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ | |
▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ | |
▓▓▓▓ ░░▓▓▓▓▓▓ ▓▓▓▓▓▓░░ ▓▓▓▓ | |
▓▓▓▓ ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ▓▓▓▓ | |
▓▓▓▓ ░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░ ▓▓▓▓ | |
▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ | |
▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* batchGenerator(array, batchSize) { | |
const arrCopy = [...array]; | |
while(arrCopy.length>0){ | |
yield arrCopy.splice(0, batchSize); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function start() { | |
for await (let asyncFunction of asyncFunctions ) { | |
console.log(await asyncFunction()) | |
} | |
} | |
start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
callApi = [url1, url2, url3] | |
const pormiseArr = callApi.map(v => getFromApi(v)) | |
const ConcurrentLoop = async() => { | |
for await (const resolvedPromise in pormiseArr) { | |
console.log(resolvedPromise) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const returnPromeseAll = async () => { | |
try{ | |
const a = getPromise1() | |
const b = getPromise2() | |
const concurrentResult = await Promise.all([a, b]) | |
} | |
catch(err) { | |
throw err | |
} | |
return concurrentResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const returnPromiseFromPromise = async (decree) => { | |
return new Promise((resolve, reject) => { | |
getPromise() | |
.then(result => resolve(result)) | |
.catch(Error => reject(Error)) | |
}) | |
} |
NewerOlder