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

Function callbackify

lib/index.es.js:7847–7856  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

7845}
7846
7847function callbackify(fun) {
7848 return function (...args) {
7849 var cb = args.pop();
7850 var promise = fun.apply(this, args);
7851 if (typeof cb === 'function') {
7852 promisedCallback(promise, cb);
7853 }
7854 return promise;
7855 };
7856}
7857
7858// Promise finally util similar to Q.finally
7859function fin(promise, finalPromiseFactory) {

Callers 1

createAbstractMapReduceFunction · 0.70

Calls 1

promisedCallbackFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…