105
kind: TransformKind.Primitive,
106
extract: (from: T) => {
108
>
// We map the object to JSON for two reasons (a) reduce issues with references to
109
>
// mutable type that could be held internally in the LogAdapter and (b) to make
110
>
// object comparison work with the data we re-hydrate from disk (e.g. if using
111
>
// objectsEqual, a hydrated URI is not equal to the serialized UriComponents)
112
>
if (!!value && typeof value === 'object') {
113
value = deepCloneWithFallback(value);
114
}
116
>
return value;
117
>
},
118
equals: comparator ?? ((a, b) => a === b),
119
};