code: function sync(fn) {
    return function(done) {
      var res = isGenerator(fn) ? co(fn) : fn(done);
      if (isPromise(res)) {
        res.then(function(){ done(); }, done);
      } else {
        fn.length || done();
      }
    };
  }
docs: Wrap `fn` to handle any attempts at asynchrony
  
  @param {Function|GeneratorFunction} fn
  @return {Function}