import { Change } from 'Blini'
When saving Blini diffs the current document with the loaded version to only update required fields.
a.compareWith(b) can be use to compare a document version with another one, it returns a list of changes to transform a in to b.
a.compareWith(b)
a
b
Change { type: String, path: String, value: Mixed }
type may be Change.TYPES.SET or Change.TYPES.UNSET.
type
Change.TYPES.SET
Change.TYPES.UNSET
toMongo
toMongo(changes: List<Change>): Object
Convert a list of changes into a MongoDB updatearrow-up-right's body.
Last updated 6 years ago