lib/revive.js
function reviveValue (context, key, value, reviver) {
  if (Array.isArray(value)) {
    return reviver.call(context, key, reviveArray(value, reviver));
  }
  else if (value && typeof value === 'object' && !value.isLosslessNumber) {
    // note the special case for LosslessNumber,
    // we don't want to iterate over the internals of a LosslessNumber
    return reviver.call(context, key, reviveObject(value, reviver))
  }
  else {
    return reviver.call(context, key, value)
  }
}
function reviveValue (context, key, value, reviver) {
  if (Array.isArray(value)) {
    return reviver.call(context, key, reviveArray(value, reviver));
  }
  else if (value && typeof value === 'object' && !value.isLosslessNumber) {
    // note the special case for LosslessNumber,
    // we don't want to iterate over the internals of a LosslessNumber
    return reviver.call(context, key, reviveObject(value, reviver))
  }
  else {
    return reviver.call(context, key, value)
  }
}
function reviveValue ( context , key , value , reviver ) { if ( Array . isArray ( value ) ) { return reviver . call ( context , key , reviveArray ( value , reviver ) ) ; } else if ( value && typeof value === 'object' && ! value . isLosslessNumber ) { // note the special case for LosslessNumber, // we don't want to iterate over the internals of a LosslessNumber return reviver . call ( context , key , reviveObject ( value , reviver ) ) } else { return reviver . call ( context , key , value ) } }
Revive a value
@param {Object | Array} context
@param {string} key
@param {*} value
@param {function(key: string, value: *)} reviver
@return {*}
Revive a value