Skip to content

Instantly share code, notes, and snippets.

@jonathantneal
Created August 8, 2014 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathantneal/46faca63048e8e5be579 to your computer and use it in GitHub Desktop.
Save jonathantneal/46faca63048e8e5be579 to your computer and use it in GitHub Desktop.
Function: Get Arguments
(function (toString, getArgsRe, splitArgsRe) {
Function.prototype.getArguments = function () {
return toString.call(this).match(getArgsRe)[1].split(splitArgsRe);
};
})(String.prototype.toString, /\(([^)]+)/, /\s*,\s*/);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment