index.js
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();
    }
  };
}
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();
    }
  };
}
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 ( ) ; } } ; }
Wrap `fn` to handle any attempts at asynchrony

@param {Function|GeneratorFunction} fn
@return {Function}
Wrap fn to handle any attempts at asynchrony