MCPcopy
hub / github.com/di-sukharev/opencommit / async

Function async

out/cli.cjs:24390–24404  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

24388 var defer = require_defer();
24389 module2.exports = async;
24390 function async(callback) {
24391 var isAsync = false;
24392 defer(function() {
24393 isAsync = true;
24394 });
24395 return function async_callback(err, result) {
24396 if (isAsync) {
24397 callback(err, result);
24398 } else {
24399 defer(function nextTick_callback() {
24400 callback(err, result);
24401 });
24402 }
24403 };
24404 }
24405 }
24406});
24407

Callers 2

runJobFunction · 0.85
terminatorFunction · 0.85

Calls 2

deferFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…