Skip to content

Instantly share code, notes, and snippets.

@yocontra
Last active December 22, 2015 02:19
Show Gist options
  • Save yocontra/6402659 to your computer and use it in GitHub Desktop.
Save yocontra/6402659 to your computer and use it in GitHub Desktop.
Logging utility function for async.js
var log = function(msg) {
return function() {
var args = Array.prototype.slice.call(arguments);
var cb = args.pop();
console.log(msg);
cb.apply(null, [null].concat(args));
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment