Constructors
constructor
- new Omnom(options?: object): Omnom
-
Parameters
-
Default value options: object = {}
-
Optional atomicNumbers?: undefined | true | false
Properties
options
options: object
Type declaration
-
Optional atomicNumbers?: undefined | true | false
Methods
Private almostEqual
- almostEqual(o1: Object, o2: Object): number
-
Parameters
Returns number
diff
- diff(original: number, modified: number): Omnom
- diff(original: [any], modified: any[]): Omnom
- diff(original: ObjectID, modified: ObjectID): Omnom
- diff(original: Object, modified: Object): Omnom
-
Parameters
-
original: number
-
modified: number
-
Parameters
-
original: [any]
-
modified: any[]
-
Parameters
-
original: ObjectID
-
modified: ObjectID
-
Parameters
-
original: Object
-
modified: Object
Private inc
- inc(path: string, value: number): void
-
Parameters
-
path: string
-
value: number
Returns void
Private onArray
- onArray(original: any[], modified: any[], changePath: string): void
-
Parameters
-
original: any[]
-
modified: any[]
-
changePath: string
Returns void
Private onLargerArray
- onLargerArray(original: any[], modified: any[], changePath: string): void
-
Parameters
-
original: any[]
-
modified: any[]
-
changePath: string
Returns void
Private onNumber
- onNumber(original: number, modified: number, changePath: string): void
-
Parameters
-
original: number
-
modified: number
-
changePath: string
Returns void
Private onObject
- onObject(original: object, modified: object, changePath?: undefined | string): void
-
Parameters
-
original: object
-
modified: object
-
Optional changePath: undefined | string
Returns void
Private onObjectID
- onObjectID(original: ObjectID, modified: ObjectID, changePath: string): void
-
Parameters
-
original: ObjectID
-
modified: ObjectID
-
changePath: string
Returns void
Private onScalar
- onScalar(original: any, modified: any, changePath: string): void
-
Parameters
-
original: any
-
modified: any
-
changePath: string
Returns void
Private onSimilarArray
- onSimilarArray(original: any[], modified: any[], changePath: string): void
-
Parameters
-
original: any[]
-
modified: any[]
-
changePath: string
Returns void
Private onSmallerArray
- onSmallerArray(original: any[], modified: any[], changePath: string): void
-
Parameters
-
original: any[]
-
modified: any[]
-
changePath: string
Returns void
Private onSomething
- onSomething(original: number, modified: number, changePath?: undefined | string): void
- onSomething(original: any[], modified: any[], changePath?: undefined | string): void
- onSomething(original: ObjectID, modified: ObjectID, changePath?: undefined | string): void
- onSomething(original: Object, modified: Object, changePath?: undefined | string): void
-
Parameters
-
original: number
-
modified: number
-
Optional changePath: undefined | string
Returns void
-
Parameters
-
original: any[]
-
modified: any[]
-
Optional changePath: undefined | string
Returns void
-
Parameters
-
original: ObjectID
-
modified: ObjectID
-
Optional changePath: undefined | string
Returns void
-
Parameters
-
original: Object
-
modified: Object
-
Optional changePath: undefined | string
Returns void
Private onUndefined
- onUndefined(original: undefined | null, modified: any, changePath: string): void
-
Parameters
-
original: undefined | null
-
modified: any
-
changePath: string
Returns void
Private pull
- pull(path: string, value: any): void
Private pullAll
- pullAll(path: string, values: any[]): void
-
Parameters
-
path: string
-
values: any[]
Returns void
Private push
- push(path: string, value: any): void
Private resolve
- resolve(...args: (undefined | string)[]): string
-
Parameters
-
Rest ...args: (undefined | string)[]
Returns string
Private set
- set(path: string, value: any): void
Private unset
- unset(path: string): void
Static diff
- diff(original: number, modified: number, options?: undefined | object): Changes
- diff(original: [any], modified: any[], options?: undefined | object): Changes
- diff(original: ObjectID, modified: ObjectID, options?: undefined | object): Changes
- diff(original: Object, modified: Object, options?: undefined | object): Changes
-
Parameters
-
original: number
-
modified: number
-
Optional options: undefined | object
-
Parameters
-
original: [any]
-
modified: any[]
-
Optional options: undefined | object
-
Parameters
-
original: ObjectID
-
modified: ObjectID
-
Optional options: undefined | object
-
Parameters
-
original: Object
-
modified: Object
-
Optional options: undefined | object