Hacker News new | ask | show | jobs
by esailija 4079 days ago
It doesn't matter at all what kind of promise flavor an API returns because promise implementations treat other implementations as interchangeable.

Even the ES6 Promises implementation supports this:

    Promise.all([{
        then: function(r) {
            r(3);
        }
    }]).then(function(result) {
        console.log(result);
    });
Here the plain object with then could have been any promise implementation, even jQuery, and it still works.
1 comments

I do understand that, but it'd be very nice to be able to do some things like timeouts and the like, without loading quite a few kilobytes of another promise implementation.