promise.md

July 15, 2021 ยท View on GitHub

Bookmarks tagged [promise]

www.codever.land/bookmarks/t/promise

async/await in Angular ngOnInit

https://stackoverflow.com/questions/56092083/async-await-in-angular-ngoninit

It is no different than what you had before. ngOnInit will return a Promise and the caller will ignore that promise. This means that the caller will not wait for everything in your method to finish ...


toniov/p-iteration: Utilities that make array iteration easy when using async/await or Promises

https://github.com/toniov/p-iteration


javascript - Promise constructor with reject call vs throwing error - Stack Overflow

https://stackoverflow.com/questions/28703241/promise-constructor-with-reject-call-vs-throwing-error?...


Introduction to ES6 Promises - 4 functions to avoid callback hell

http://jamesknelson.com/grokking-es6-promises-the-four-functions-you-need-to-avoid-callback-hell/

Apart from being new and shiny, Promises are a great way to clean up your code, reduce dependencies on external libraries, and prepare yourself for async and await in ES7. Developers who use them swea...


Unhandled Promise Rejections in Node.js

http://thecodebarbarian.com/unhandled-promise-rejections-in-node.js

Node.js 6.6.0 added a sporadically useful bug/feature: logging unhandled promise rejections to the console by default. In other words, the below script will print an error to the console: ...


GitHub - domenic/chai-as-promised

https://github.com/domenic/chai-as-promised

Extends Chai with assertions about promises. Contribute to domenic/chai-as-promised development by creating an account on GitHub.


ES6 Promises (with Angular 2) Explained - YouTube

https://www.youtube.com/watch?v=viaF0hM8G94

An introduction to ES6 Promises. The example uses Angular 2 but the concepts apply to any ES6/ES2015 JavaScript code.

Great and easy to understand - compares callback code to promises...


Using promises - JavaScript | MDN

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises

A Promise is an object representing the eventual completion or failure of an asynchronous operation. A promi...