promise-me icon indicating copy to clipboard operation
promise-me copied to clipboard

POC for chrome style callbacks

Open noway opened this issue 8 years ago • 0 comments

Doesn't properly work with catches, but at least converts the main part of it.

For the following callback style:

    getDetails(function(hm5) {
      getLongLat(function (hm6) {
        getNearbyBars(function (hm4) {
          return console.log({foo: 'bar'});
        }, function (hm) {
          return console.log();
        });
      }, function (hm2) {
        return console.log();
      });
    }, function(hm3) {
      return console.log();
    });

noway avatar Mar 16 '17 13:03 noway