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

Function fin

lib/index-browser.js:7874–7884  ·  view source on GitHub ↗
(promise, finalPromiseFactory)

Source from the content-addressed store, hash-verified

7872
7873// Promise finally util similar to Q.finally
7874function fin(promise, finalPromiseFactory) {
7875 return promise.then(function (res) {
7876 return finalPromiseFactory().then(function () {
7877 return res;
7878 });
7879 }, function (reason) {
7880 return finalPromiseFactory().then(function () {
7881 throw reason;
7882 });
7883 });
7884}
7885
7886function sequentialize(queue, promiseFactory) {
7887 return function () {

Callers 1

queryPromisedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected