Brett Zamir
on 2012-06-21 02:36:37
@David: Thanks for the fix with the missing userdata argument. I changed it a bit to check for arguments.length (number of arguments passed), since otherwise, it won't allow explicit passing of "undefined" as an argument. I also added support for closures and PHP-style object-function arrays, added an option to avoid eval (not on by default since eval() is more PHP-like in allowing calls to built-in functions), and provided support within array() for walk() as a chainable method.
Changes are in Git (see "raw js source").
David
on 2012-06-18 20:34:46
Line 21 doesn't make any sense, you are only passing userdata to the function, and userdata is undefined. Line 21 should be:
eval(funcname + '(array[key] , key)');