MCPcopy Index your code
hub / github.com/apache/pouchdb / defaultsTo

Function defaultsTo

lib/index-browser.js:8424–8433  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

8422 }
8423
8424 function defaultsTo(value) {
8425 return function (reason) {
8426 /* istanbul ignore else */
8427 if (reason.status === 404) {
8428 return value;
8429 } else {
8430 throw reason;
8431 }
8432 };
8433 }
8434
8435 // returns a promise for a list of docs to update, based on the input docId.
8436 // the order doesn't matter, because post-3.2.0, bulkDocs

Callers 4

getMetaDocFunction · 0.70
updatePurgeSeqFunction · 0.70
saveKeyValuesFunction · 0.70
getRecentPurgesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…