fix(core): update
This commit is contained in:
@ -6,7 +6,7 @@ export class Smartjson {
|
||||
// ======
|
||||
public static parse = JSON.parse;
|
||||
|
||||
public static stringify = (objArg: any, optionsArg: plugins.stableJson.Options) => {
|
||||
public static stringify = (objArg: any, optionsArg: plugins.IStableJsonTypes['Options']) => {
|
||||
return plugins.stableJson(objArg, optionsArg);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,18 @@
|
||||
import lodashCloneDeep from 'lodash.clonedeep';
|
||||
import stableJson from 'fast-json-stable-stringify';
|
||||
import stableJson2 from 'fast-json-stable-stringify';
|
||||
|
||||
const stableJson = stableJson2 as any;
|
||||
|
||||
export { lodashCloneDeep, stableJson };
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user