Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

Promise library targeting ES3

"Promises/A+ logo"

Description

This is simply an implementation of the then function, just for learning.
It is written with ES3 syntax.
setTimeout is used to ensure asynchronous flow.

Contrary to many other implementations, here a promise object only exposes status, value and resolve properties. No internal properties are exposed. Instead, an enhanced promise object is created for every promise and a register links the promise to its enhanced promise.
At the moment the register is a simple array and this data structure should be replaced in a future better performing version.

Promises/A+ compliance tests

npm run test

Note

Command used to generate minified file

.node_modules/uglify-js/bin/uglifyjs src/promise.js --support-ie8 --compress --output src/promise.min.js

About

An implementation of Promise then with ES3 syntax

Resources

Releases

No releases published
You can’t perform that action at this time.