Skip to content

Instantly share code, notes, and snippets.

@emkamal
Created July 13, 2021 13:19
Show Gist options
  • Save emkamal/fb0f3df38ddede8d11952c58b1389fe2 to your computer and use it in GitHub Desktop.
Save emkamal/fb0f3df38ddede8d11952c58b1389fe2 to your computer and use it in GitHub Desktop.
Js snippet to log all function calls
(function() {
var call = Function.prototype.call;
Function.prototype.call = function() {
console.log(this, arguments); // Here you can do whatever actions you want
return call.apply(this, arguments);
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment