In order to facilitate the understanding of the principle of Promise
, I wrote a Promise
object to realize the function of Promise
.
yarn
yarn test
or
npm install
npm run test
Promise.resolve('complete').then(r => {
console.log(`the status is `, r)
})
On the basis of version 1.0.0, it is clearer to organize Promise from function into class.
Achieved the Promises/A+ 1.1.0 standard and passed the test cases.