Merlin Delta
Merlin Schema is a delta implementation developed for the (soon to be released) Merlin ORM.
Designed as a standalone package to allow anyone to create and apply deltas without needing an entire ORM.
Use it with node or in the browser using browserify.
npm install merlin-delta
Example
var delta = ; // create an old version of a person recordvar oldRecord = name: first: 'John' last: 'Doe' born: 'Jan 23, 1981' sex: 'M'; // create an new version of a person recordvar newRecord = name: first: 'Johnny' last: 'Doe' born: 'Jan 24, 1981' sex: 'M'; // create a delta from the old and new copy of the recordvar delta = delta; // lets look at the diffdeltadiff $set: 'name.first': 'Johnny' born: Sat Jan 24 1981 00:00:00 GMT- ;