Add call and apply methods to RegExp.prototype
steves_list at hotmail.com
Fri Dec 21 07:33:38 PST 2007
Yes, its easy to pull off oneself, so I don't care much other way. Still, it
seems pretty weird to me to be able to do ``regex(str)`` but not
``regex.call(context, str)``. This is accentuated when typeof returns
"function" for regexes (though it seems ES4 will change this to "object").
Yuh-Ruey Chen wrote:
> Sounds like a good idea to me. On the other hand, this can already
> easily be done in ES3.
> Steven L. wrote:
>> ES4 proposals include making regexes callable as a function on a
>> single string argument, which serves as a shorthand for calling the
>> regex's exec method. To further extend this idea, what about also
>> including call and apply methods on RegExp.prototype ...
View this message in context: http://www.nabble.com/Add-call-and-apply-methods-to-RegExp.prototype-tp14429329p14457280.html
Sent from the Mozilla - ECMAScript 4 discussion mailing list archive at Nabble.com.
More information about the Es4-discuss