@shko.online/componentframework-mock
Version:
Mocking library to help with testing PowerApps Component Framework Components
23 lines (21 loc) • 623 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.itemEqual = void 0;
/*
Copyright (c) 2022 Betim Beja and Shko Online LLC
Licensed under the MIT license.
*/
const itemEqual = (source, target) => {
if (source === null && target === null) {
return true;
}
if (typeof source === 'object' || typeof target === 'object') {
const sourceO = source;
const targetO = target;
return sourceO !== null && targetO !== null && sourceO.entityType === targetO.entityType && sourceO.id === targetO.id;
}
return source === target;
};
exports.itemEqual = itemEqual;