Letting RegExp method return something iterable?
andrea.giammarchi at gmail.com
Wed Aug 28 14:41:27 PDT 2013
On Wed, Aug 28, 2013 at 2:12 AM, Forbes Lindesay <forbes at lindesay.co.uk>wrote:
> a simple way to loop over the list of matches for a regular expression
it's about 10 years or more we have that .. so to make my very personal
I've got 99 problems in JS, make everything an iterator ain't one
Specially when the need comes out of an example and code that does not
fully understand or use what's available since ever in JS, specially for
something that has never been a real-world problem (but please tell me how
better your app would have been otherwise)
`for(let m of lazySplit('a.b.c', /\./g))` taking my example and prioritize
something else since generators give already us the ability to do that? ^_^
Or maybe not, fine for me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss