var Resolver = require('y-resolver'),
res = new Resolver(),
yd = res.yielded;
setTimeout(function(){
res.accept('hi');
});
if(!yd.done) yd.listen(function(){
if(this.accepted) console.log(this.value); // hi
else throw this.error;
});
yd.then(function(value){
console.log(value); // hi
});
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
A backwards compatible extension to the Promises/A+ spec
License
manvalls/y-resolver
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A backwards compatible extension to the Promises/A+ spec
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published