On 5 July 2015 at 15:41, 'Erik Arvidsson' via v8-users <
[email protected]> wrote:

> Beware that destructing is coming soon and then this approach will no
> longer work.
>
> At that point you will need a full ES'15 parser which requires a lot of
> code.
>

In fact, the very notion of "argument name" doesn't really exist anymore.
In general, you just have some names for random components of arguments, at
the time of invocation.

/Andreas



> On Jul 5, 2015 8:48 AM, "Ben Noordhuis" <[email protected]> wrote:
>
>> On Sun, Jul 5, 2015 at 3:53 AM, Francisco Tolmasky <[email protected]>
>> wrote:
>> > Essentially, if the func was function a(a,b,c), is there any way to get
>> > "a","b", and "c"?
>>
>> It's not pretty but /^function
>>
>> [^(]*\((.*?)\)/.exec(func.toString())[1].split(/\s*,\s*/).filter(function(s)
>> { return !!s }) should do it.
>>
>> The .toString() call is not strictly necessary but I put it in for
>> clarity.
>>
>> --
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to