MCPcopy Index your code
hub / github.com/share/sharedb / commitSnapshotWithMetadata

Function commitSnapshotWithMetadata

test/db.js:246–252  ·  view source on GitHub ↗
(db, cb)

Source from the content-addressed store, hash-verified

244 });
245
246 function commitSnapshotWithMetadata(db, cb) {
247 var data = {x: 5, y: 6};
248 var metadata = {test: 3};
249 var op = {v: 0, create: {type: 'http://sharejs.org/types/JSONv0', data: data}};
250 var snapshot = {v: 1, type: 'http://sharejs.org/types/JSONv0', data: data, m: metadata};
251 db.commit('testcollection', 'test', op, snapshot, null, cb);
252 }
253
254 describe('getSnapshot', function() {
255 it('getSnapshot returns v0 snapshot', function(done) {

Callers 1

db.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…