Created
July 10, 2013 16:01
-
-
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…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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