Skip to content

Instantly share code, notes, and snippets.

@SimonRichardson
Created July 10, 2013 16:01
Show Gist options
  • Select an option

  • Save SimonRichardson/5967545 to your computer and use it in GitHub Desktop.

Select an option

Save SimonRichardson/5967545 to your computer and use it in GitHub Desktop.
bilby.js promise, I'd assume that you would want to do the following? The only downside I can foresee is that we loose the documentation of fantasy promises (through emu). I could be wrong and it could be a flag for this sort of stuff? You could possibly get rid of rigger for concat of files and just rely on require as well, might be worth exper…
var Promise = require('fantasy-promises');
/**
## isPromise(a)
Returns `true` if `a` is `Promise`.
**/
var isPromise = isInstanceOf(Promise);
bilby = bilby
.property('Promise', Promise)
.property('isPromise', isPromise)
.method('map', isPromise, function(a, b) {
return a.map(b);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment