promise-nuggets / promise-nuggets.github.io Goto Github PK
View Code? Open in Web Editor NEWPromise nuggets is a set of JavaScript promise tutorials and common patterns.
Promise nuggets is a set of JavaScript promise tutorials and common patterns.
var current = Promise.fulfilled();
Promise.fulfilled() seems to be undocumented. I think it might be the same as Promise.resolve()
Unrelated Suggestion:
In the notes, or as a comment, point out that getItem( id ) returns a promise (especially unresolved, unlike the first in the chain), otherwise it looks to newbs like me that there's no async magic happening anywhere in this example. (I think I have this figured out)
Update mapLimit
not to rely on bluebird, but only mention the bluebird option like in "Wrapping callback functions".
Update "Doing things in parallel" to use the now general Promise.all
Update "Complex task dependencies" to use destructuring and only recommend spread/join as a bluebird alternative.
The callback is called with no error and an array of results after all operations are complete, or when the first error is encountered.
I believe the callback of waterfall gets the last task's result rather than an array of results(that's what series
's callback gets).
Will make a PR for it.
"And that operation is represanted with a promise." should be "And that operation is represented with a promise." at https://github.com/promise-nuggets/promise-nuggets.github.io/blob/master/articles/01-the-simplest-example.html#L20
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.