3 ms·
Also, fun is that `.nodeify(cb)` protects against undefined. So, it's a handy way to make your library support both promises and callbacks. module.exports
by vkjv 11y ago
Also, fun is that `.nodeify(cb)` protects against undefined. So, it's a handy way to make your library support both promises and callbacks.
module.exports = function (arg, optionalCb) {
return promiseReturningFn(arg).nodeify(optionalCb);
};