2019-07-04 15:03:15 +00:00
|
|
|
import lodashCloneDeep from 'lodash.clonedeep';
|
2019-12-15 19:05:20 +00:00
|
|
|
import stableJson2 from 'fast-json-stable-stringify';
|
|
|
|
|
|
|
|
const stableJson = stableJson2 as any;
|
2019-02-14 22:16:34 +00:00
|
|
|
|
2019-07-04 15:04:24 +00:00
|
|
|
export { lodashCloneDeep, stableJson };
|
2019-12-15 19:05:20 +00:00
|
|
|
|
|
|
|
export interface IStableJsonTypes {
|
|
|
|
Comparator: (a: IStableJsonTypes['CompareDescriptor'], b: IStableJsonTypes['CompareDescriptor']) => number;
|
|
|
|
CompareDescriptor: {
|
|
|
|
key: string;
|
|
|
|
value: any;
|
|
|
|
};
|
|
|
|
Options: {
|
|
|
|
cmp?: (a: IStableJsonTypes['CompareDescriptor'], b: IStableJsonTypes['CompareDescriptor']) => number;
|
|
|
|
cycles?: boolean;
|
|
|
|
};
|
|
|
|
}
|