A backwards compatible extension to the Promises/A+ spec
JavaScript
Latest commit 2fc91f1 Jan 20, 2017 @manvalls 9.7.3

README.md

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