Replace ObjectUtils.js with objects.ts

This commit is contained in:
Michael Telatynski 2021-02-19 00:00:10 +00:00
parent 8fc244452c
commit 3ca5632f6a
6 changed files with 10 additions and 124 deletions

View file

@ -86,6 +86,7 @@ export function objectShallowClone<O extends {}>(a: O, propertyCloner?: (k: keyo
* @returns True if there's a difference between the objects, false otherwise
*/
export function objectHasDiff<O extends {}>(a: O, b: O): boolean {
if (a === b) return false;
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (arrayHasDiff(aKeys, bKeys)) return true;