index.js
function get(obj, fn) {
  if (typeof obj === 'object') return fn(null, obj);
  if (typeof obj === 'undefined') return fn(null, {});
  if (typeof obj !== 'function') return fn(new Error('cannot read conf:\n' + obj));
  if (obj.length === 1) return obj(fn);
  var val;
  try {
    val = obj();
  } catch(err) {
    return fn(err);
  }
  fn(null, val);
}
function get(obj, fn) {
  if (typeof obj === 'object') return fn(null, obj);
  if (typeof obj === 'undefined') return fn(null, {});
  if (typeof obj !== 'function') return fn(new Error('cannot read conf:\n' + obj));
  if (obj.length === 1) return obj(fn);
  var val;
  try {
    val = obj();
  } catch(err) {
    return fn(err);
  }
  fn(null, val);
}
function get ( obj , fn ) { if ( typeof obj === 'object' ) return fn ( null , obj ) ; if ( typeof obj === 'undefined' ) return fn ( null , { } ) ; if ( typeof obj !== 'function' ) return fn ( new Error ( 'cannot read conf:\n' + obj ) ) ; if ( obj . length === 1 ) return obj ( fn ) ; var val ; try { val = obj ( ) ; } catch ( err ) { return fn ( err ) ; } fn ( null , val ) ; }
Lazily evaluate the value

@param {Any} obj
@param {Function} fn
Lazily evaluate the value