MCPcopy Create free account
hub / github.com/apache/pouchdb / defaultsTo

Function defaultsTo

lib/index.js:8462–8471  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

8460 }
8461
8462 function defaultsTo(value) {
8463 return function (reason) {
8464 /* istanbul ignore else */
8465 if (reason.status === 404) {
8466 return value;
8467 } else {
8468 throw reason;
8469 }
8470 };
8471 }
8472
8473 // returns a promise for a list of docs to update, based on the input docId.
8474 // 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…