function lazyCache(fn) {
  var cache = {};
  var proxy = function(mod, name) {
    name = name || camelcase(mod);

    // check both boolean and string in case `process.env` cases to string
    if (process.env.UNLAZY === 'true' || process.env.UNLAZY === true || process.env.TRAVIS) {
      cache[name] = fn(mod);
    }

    Object.defineProperty(proxy, name, {
      enumerable: true,
      configurable: true,
      get: getter
    });

    function getter() {
      if (cache.hasOwnProperty(name)) {
        return cache[name];
      }
      return (cache[name] = fn(mod));
    }
    return getter;
  };
  return proxy;
}
Cache results of the first function call to ensure only calling once.

```js
var utils = require('lazy-cache')(require);
// cache the call to `require('ansi-yellow')`
utils('ansi-yellow', 'yellow');
// use `ansi-yellow`
console.log(utils.yellow('this is yellow'));
```

@param  {Function} `fn` Function that will be called only once.
@return {Function} Function that can be called to get the cached function
@api public