Axel Rauschmayer (2013-08-24T19:39:16.000Z)
At the moment, the following two methods abuse regular expressions as iterators (if the /g flag is set):

* `RegExp.prototype.test()`
* `RegExp.prototype.exec()`

Would it make sense to create similar methods that return something iterable, so that for-of can iterate over the result?

Axel

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130824/371ed2ae/attachment.html>
domenic at domenicdenicola.com (2013-09-08T00:22:08.521Z)
At the moment, the following two methods abuse regular expressions as iterators (if the /g flag is set):

* `RegExp.prototype.test()`
* `RegExp.prototype.exec()`

Would it make sense to create similar methods that return something iterable, so that for-of can iterate over the result?