UNPKG

451 BJavaScriptView Raw
1// Generated by CoffeeScript 1.10.0
2(function() {
3 var async, call, isGeneratorFunction, lift;
4
5 lift = require("when/generator").lift;
6
7 isGeneratorFunction = require("./type").isGeneratorFunction;
8
9 async = function(f) {
10 if (isGeneratorFunction(f)) {
11 return lift(f);
12 } else {
13 return f;
14 }
15 };
16
17 call = function(f) {
18 return async(f)();
19 };
20
21 module.exports = {
22 async: async,
23 call: call
24 };
25
26}).call(this);