lib/types.js
function readValue(type, tap, resolver, lazy) {
  if (resolver) {
    if (resolver._readerType !== type) {
      throw new Error('invalid resolver');
    }
    return resolver._read(tap, lazy);
  } else {
    return type._read(tap);
  }
}
function readValue(type, tap, resolver, lazy) {
  if (resolver) {
    if (resolver._readerType !== type) {
      throw new Error('invalid resolver');
    }
    return resolver._read(tap, lazy);
  } else {
    return type._read(tap);
  }
}
function readValue ( type , tap , resolver , lazy ) { if ( resolver ) { if ( resolver . _readerType !== type ) { throw new Error ( 'invalid resolver' ) ; } return resolver . _read ( tap , lazy ) ; } else { return type . _read ( tap ) ; } }
Read a value from a tap.

@param type {Type} The type to decode.
@param tap {Tap} The tap to read from. No checks are performed here.
@param resolver {Resolver} Optional resolver. It must match the input type.
@param lazy {Boolean} Skip trailing fields when using a resolver.
Read a value from a tap .