Cyril Auburtin

Results 94 comments of Cyril Auburtin

It's really annoying that react-scripts can't allow a dynamic public/index.html.js template function Here are the 2 ways I've found to have a dynamic index.html template: The first one is quick-and-dirty,...

Here's what I've done in a recent app: ```js // fragile and ugly way to inject dynamic vars in index.html, see https://github.com/facebook/create-react-app/issues/2353 const mEndOfHeadIndex = indexHtml.match(//).index; const mAppContainerAttributesIndex = indexHtml.match(/(?/).index;...

thanks ```js arrowFunc.callee.async = true ``` actually

note for that particular example, you could do ```js await async.map(['file1','file2','file3'], fs.promises.stat); // or without async lib await Promise.all(['file1','file2','file3'].map(name => fs.promises.stat(name)) ``` or if you want an object as result...

@flatcoding https://github.com/caub/misc/blob/master/utils/promise-concurrent.js, if you don't want `await`, you can replace it by a recursive function

I thought by "simple Promise-based example", you meant an example without any library if you wanted an example with this library, I'm sure there are plenty

@romanbalayan nice the methods we use the most are `async.parallel`, and `async.auto`, do you plan to cover those too? note: I think you could avoid the async IIFE `(async ()=>{`...

@romanbalayan what you could do is set up that PR branch as github page (go in your fork of async, settings > Github pages > Source: (pick your PR branch))...

@romanbalayan nice! https://romanbalayan.github.io/async/v3/docs.html#auto I feel like the callback and promises examples are always quite similar, probably worth having just one of them, since anyway when using promises, we'd rather go...

I think yes you could Also for the flow control methods, you could add examples with async inner functions, example: ```js const delay = (t, v) => new Promise(r =>...