@mathias What do you think of having `function.argumentNames` available in `function` scope? Similar to meta properties proposed here: https://github.com/allenwb/ESideas/blob/master/ES7MetaProps.md … It's a common use-case for debugging and argument assertion.
Do you want to get the argument names of a random function or do you want access to it in the function itself? Meta properties don’t leak and can’t be used from the original function body.
-
-
Also if you add it as a property to all functions then minifiers mangling function params would be unsafe because it would change runtime semantics.
-
This is what I would like: ```js function foo() { // Only available inside the function console.log(foo.argumentNames); //=> ['unicorn'] } const unicorn = true; foo(unicorn); console.log(foo.argumentNames); //=> undefined ```
- 3 more replies
New conversation -
-
-
I want access to it inside the function itself.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 