callback friendly co for generator async control flow
var fs = ;var cocb = ;var readFileYieldable = cocb;cocb;
This simply outputs package.json concatenated with index.js
Run the generator function, callback when finished.
return true if it is a generator function
cocb.wrap(fn_with_callback) or cocb.wrap(fn*)
Converts a callback function, or generator into one you can
yield. (i.e. a
Promise function - see co.wrap)
var foo = cocb.wrap;var bar = cocb.wrap;yield fooyield bar}, callback);
Promises are lies ;)
Promise hell is a real place, it's complicated, has hidden errors, and lies to you with a smile. Callbacks are simpler and naturally robust, but yes, it has a hell too.
As with any programming tool, you need learn, practice, and master. If you don't, you will waste a lot of time in hell.