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

Function defaultsTo

lib/index.es.js:8457–8466  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

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