243
*/
244
export function distinct(base: obj, target: obj): obj {
245
>
const result = Object.create(null);
objects.ts
246
>
247
>
if (!base || !target) {
248
return result;
249
}
251
>
const targetKeys = Object.keys(target);
252
>
targetKeys.forEach(k => {
253
>
const baseValue = base[k];
254
>
const targetValue = target[k];
255
>
256
>
if (!equals(baseValue, targetValue)) {
257
>
result[k] = targetValue;
258
>
}
259
>
});
260
>
261
>
return result;
262
>
}
263
264
export function getCaseInsensitive(target: obj, key: string): unknown {