On Sun, Jun 10, 2012 at 12:48 PM, Irakli Gozalishvili <[email protected]>wrote:
> Never the less problem still stands, but maybe there are other ways to
> solve it. Only solution I'm left with so far is utility function like this:
>
> function hasRest(f) {
> return !!~String(f).split('\n').shift().indexOf('...')
> }
>
> Which is bad, specially toString of function is not guaranteed to return
> source.
>
> Maybe alternative solution could be some standard function / method to
> test if the function captures ...rest args.
>
You could imagine a method like Function.prototype.hasRestArgs, but that
wouldn't catch the existing varargs-style coding based on arguments.
--
John A. Tamplin
Software Engineer (GWT), Google
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss