feature(tryRequire) options: add callback

This commit is contained in:
coderaiser 2014-10-17 09:36:55 -04:00
parent cff157d7f1
commit 9a3f87fcff

View file

@ -11,9 +11,16 @@
module = require(name);
});
if (error && o.log)
Util.log(error.message);
if (error)
if (o.log)
Util.log(error.message);
else if (o.callback)
module = exec.bind(null, error);
return module;
};
function exec(error, callback) {
callback(error);
}
})();