MCPcopy
hub / github.com/apache/pouchdb / decodeMetadata

Function decodeMetadata

lib/index-browser.js:4745–4754  ·  view source on GitHub ↗
(storedObject)

Source from the content-addressed store, hash-verified

4743}
4744
4745function decodeMetadata(storedObject) {
4746 if (!storedObject) {
4747 return null;
4748 }
4749 var metadata = safeJsonParse(storedObject.data);
4750 metadata.winningRev = storedObject.winningRev;
4751 metadata.deleted = storedObject.deletedOrLocal === '1';
4752 metadata.seq = storedObject.seq;
4753 return metadata;
4754}
4755
4756// read the doc back out from the database. we don't store the
4757// _id or _rev because we already have _doc_id_rev.

Callers 5

readMetadataFunction · 0.70
processBatchFunction · 0.70
decodeMetadataCompatFunction · 0.70
initFunction · 0.70

Calls 1

safeJsonParseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…