Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bonevidy/vpromise
- Owner: boneVidy
- Created: 2018-08-11T02:36:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-11T08:41:08.000Z (over 6 years ago)
- Last Synced: 2024-10-29T16:59:45.204Z (2 months ago)
- Topics: asynchronous, defer, js, promise, typescript
- Language: TypeScript
- Homepage:
- Size: 65.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
`