code: function(key, value, proto, parseProtoCheck, reviveDate) {
          if (reviveDate && (typeof value==='string')) {
              return value.toDate() || value;
          }
          if (!Object.isObject(value)) {
              return value;
          }
          // only first level of objects can be given the specified prototype
          if ((typeof parseProtoCheck === 'function') && !parseProtoCheck(value)) {
              return value;
          }
          if (PROTO_SUPPORTED) {
              value.__proto__ = proto;
              return value;
          }
          return value.deepClone(null, proto);
      }
docs: /*jshint proto:true