Transforming a Javascript iterable into an array
You are looking for the new Array.from function which converts arbitrary iterables to array instances: var arr = Array.from(map.entries()); It is now supported in Edge, FF, Chrome and Node 4+. Of course, it might be worth to define map, filter and similar methods directly on the iterator interface, so that you can avoid allocating the … Read more