index.js
function trampoline (fn) {
  return function () {
    var result = fn.apply(this, arguments);

    while ('function' == typeof result) {
      result = result();
    }

    return result;
  };
}
function trampoline (fn) {
  return function () {
    var result = fn.apply(this, arguments);

    while ('function' == typeof result) {
      result = result();
    }

    return result;
  };
}
function trampoline ( fn ) { return function ( ) { var result = fn . apply ( this , arguments ) ; while ( 'function' == typeof result ) { result = result ( ) ; } return result ; } ; }
Generic thunk-based "trampoline" helper function.

@param {Function} input function
@return {Function} "trampolined" function
@api private
Generic thunk - based trampoline helper function .