fix(core): update

This commit is contained in:
2021-03-22 02:33:01 +00:00
parent cd2d162738
commit 5732f0e2cd
5 changed files with 2486 additions and 1685 deletions

View File

@ -1,5 +1,10 @@
import * as plugins from './smartobject.plugins';
const fastDeepEqual = plugins.fastDeepEqual;
export {
fastDeepEqual
};
export interface IObjectCompareResult {
presentInBothProperties: string[];
missingProperties: string[];
@ -60,8 +65,10 @@ export const compareObjects = (referenceObjectArg: any, comparisonObjectArg: any
}
for (const currentProperty of Object.keys(returnComparisonObject)) {
const propertySet = new Set(returnComparisonObject[currentProperty]);
const uniqueArray = [...propertySet];
const onlyUnique = (value, index, self) => {
return self.indexOf(value) === index;
};
const uniqueArray = returnComparisonObject[currentProperty].filter(onlyUnique);
returnComparisonObject[currentProperty] = uniqueArray;
}

View File

@ -1,2 +1,6 @@
const removeme = {};
export { removeme };
// tslint:disable-next-line: no-submodule-imports
import fastDeepEqual from 'fast-deep-equal/es6';
export {
fastDeepEqual
};