UNPKG

@itwin/core-react

Version:

A react component library of iTwin.js UI general purpose components

26 lines 840 B
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module Utilities */ /** Performs a shallow difference check on two objects. * @internal */ export const shallowDiffers = (a, b) => { if (a === b) return false; if (a === undefined || b === undefined) return true; for (const i in a) { if (!(i in b)) return true; } for (const i in b) { if (a[i] !== b[i]) return true; } return false; }; //# sourceMappingURL=shallowDiffers.js.map