I decided to write Adehun after the series of promise posts. Adehun means 'Promise' in Yoruba, the language of my West African tribe. After a lot of rewrites, I can say Alhamdulillaah, Adehun passes all the compliance tests of the promise/tests repo.
Tag: promises/A+
3 Ways to start using promises
Continuing from the previous post; lets dive into ways of using promises. First, some helper functions: 1. Pseudo-Observers This involves attaching several handlers to a single promise; all attached handlers are invoked once the promise resolves. I call this the 'pseudo-observer' pattern because each 'observer' gets invoked once (remember promises never leave their resolution state). This explains why promises can't … Continue reading 3 Ways to start using promises
Introduction to JavaScript Promises
A promise is a value that might not exist because the action needed to produce that value has not been carried out. Thus, after the expected action has run, the promise will have a value indicating the success or failure of the action.