MCPcopy
hub / github.com/creationix/js-git / makeAsync

Function makeAsync

mixins/mem-db.js:87–95  ·  view source on GitHub ↗
(fn, callback)

Source from the content-addressed store, hash-verified

85}
86
87function makeAsync(fn, callback) {
88 if (!callback) return makeAsync.bind(null, fn);
89 defer(function () {
90 var out;
91 try { out = fn(); }
92 catch (err) { return callback(err); }
93 callback(null, out);
94 });
95}

Callers 8

readRefFunction · 0.85
listRefsFunction · 0.85
updateRefFunction · 0.85
hasHashFunction · 0.85
saveAsFunction · 0.85
saveRawFunction · 0.85
loadAsFunction · 0.85
loadRawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected