Mozilla javascript promises are based on the ES6 standard , while jQuery promises was created before ES6.
Based on my reading of jQuery docs, ES6 then equivalent to jQuery done .
Actually there is a boat for the libraries with promises, but for me ES6 is one the easiest to understand. You do not need more than "then" and "catch", and it is very easy to combine them into a sequence of operations. Add to this with Promise.all for parallel tasks and take advantage of 99% of what you need.
return doSomething().then(function(result) { return doSomethingElse(result); }).then(function(secondResult) { return doThirdSomething(secondResult); }).catch(function(err) { console.log(err); }).then(function(finalResult) {
Some of the things jQuery supports, not ES6, is a kind of "progress."
source share