UNPKG

mongoose-history-diff

Version:

A mongoose plugin to take diffs and history of your documents

14 lines (13 loc) 761 B
import { Schema } from 'mongoose'; export declare type ExcludeFieldT = { key: string; lvl: number; }; export declare const excludeFields: (path: Array<string>, key: string, excludedFields: Array<ExcludeFieldT>) => boolean; export declare const getExcludedFields: (schema: Schema<any>) => Array<ExcludeFieldT>; export declare const realTypeOf: (obj: any) => string; export declare const hashThisString: (str: string) => number; export declare const getOrderIndependentHash: (obj: any) => number; export declare const arrayRemove: (arr: Array<any>, from: number, to?: number | undefined) => Array<any>; export declare const revertArrayChange: (arr: Array<any>, index: number, change: any) => Array<any>; export declare const deepClone: (obj: any) => any;