I'm putting together a prototype extension that parses the arguments list of ta function and passes the information to another function.

At first I was going to extend Object, so that when you call it, the code would read

Code javascript:
arguments.parse(function (name, value) {
    ...
});

but that would mean the parse function would be an extension of all objects, which while it may be useful for other purposes isn't as far as I want to extend things.

The other way that I was considering is to extend Function instead, which is seems like a better place to put it but means slightly more complex code to call it.

Code javascript:
Function.parse(arguments, function (name, value) {
    ...
});

So my question is, where do you consider is the better place to put a parse method.
  1. Object.prototype.parse = function (fn) {};
  2. Function.prototype.parse = function (args, fn) {};