Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
/ y-resolver Public archive

A backwards compatible extension to the Promises/A+ spec

License

Notifications You must be signed in to change notification settings

manvalls/y-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resolver Build Status Coverage Status

Sample usage

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
});

About

A backwards compatible extension to the Promises/A+ spec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published