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

Function parseRevisionInfo

lib/index-browser.js:4289–4300  ·  view source on GitHub ↗
(rev$$1)

Source from the content-addressed store, hash-verified

4287]);
4288
4289function parseRevisionInfo(rev$$1) {
4290 if (!/^\d+-/.test(rev$$1)) {
4291 return createError(INVALID_REV);
4292 }
4293 var idx = rev$$1.indexOf('-');
4294 var left = rev$$1.substring(0, idx);
4295 var right = rev$$1.substring(idx + 1);
4296 return {
4297 prefix: parseInt(left, 10),
4298 id: right
4299 };
4300}
4301
4302function makeRevTreeFromRevisions(revisions, opts) {
4303 var pos = revisions.start - revisions.ids.length + 1;

Callers 1

parseDocFunction · 0.70

Calls 1

createErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…