Skip to content

Instantly share code, notes, and snippets.

View jlvertol's full-sized avatar

José Luis Vergara jlvertol

  • Chile
View GitHub Profile
@yesvods
yesvods / async-parallel.js
Created July 21, 2015 09:11
ES6 async parallel execution
//mock a fs Object
let fs = {
readFile: function(filename, cb){
let randomTime = 100+Math.random()*1000>>0;
setTimeout(()=>{
cb(`hello ${filename}`)
}, randomTime)
}
}