Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bonevidy/vpromise

a lightweight promise/a+ library
https://github.com/bonevidy/vpromise

asynchronous defer js promise typescript

Last synced: 19 days ago
JSON representation

a lightweight promise/a+ library

Awesome Lists containing this project

README

        

##支持defer对象的Promise
`


const asyncNumber = () => {
const defer = VPromise.defer();
setTimeout(() => {
defer.resolve(100);

})

return defer.promise;
};
asyncNumber.then(console.log); ///100

`