On Fri, Mar 23, 2012 at 8:21 PM, Domenic Denicola < [email protected]> wrote:
> Does passing /foo/i.test not work? (Away from computer.) Perhaps it > should, if it doesn't? > It does, if you bind it to the regex first. Ie: var re = /foo/i; var filtered = array.filter(re.test.bind(re)); So that doesn't look better than just passing an anonymous function wrapper (though you probably want to build the regex once). -- John A. Tamplin Software Engineer (GWT), Google
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

