multi-map icon indicating copy to clipboard operation
multi-map copied to clipboard

`makeIterator()` return an `iterable` object

Open piranna opened this issue 4 years ago • 6 comments

This fixes #12 and allow to use for..of and array spread.

piranna avatar May 27 '21 17:05 piranna

Any update on this? I can maintain the project if given permissions.

piranna avatar Jul 13 '21 07:07 piranna

any update on this?

piranna avatar Aug 24 '21 19:08 piranna

Would love to see this merged

maximilianMairinger avatar May 16 '22 00:05 maximilianMairinger

Maybe consider making this backward compatible by only adding support for Symbol.iterator when the runtime supports it. I don't really think this should be necessary today, but seeing as this library also tries to support runtimes without Map it may be reasonable to continue this trend.

maximilianMairinger avatar May 16 '22 00:05 maximilianMairinger

Also consider adding an Iterator over the whole map, as the native map implements

for (const [key, val] of map) 

maximilianMairinger avatar May 16 '22 00:05 maximilianMairinger

Would love to see this merged

I doubt that would happen, repo owner is shown as innactive for three years...

Maybe consider making this backward compatible by only adding support for Symbol.iterator when the runtime supports it. I don't really think this should be necessary today, but seeing as this library also tries to support runtimes without Map it may be reasonable to continue this trend.

In fact, I would move the other way, remove backwards compatibility and make code smaller and simpler, if you want to use in older browsers then use a polyfill.

Also consider adding an Iterator over the whole map

Not a bad idea, just only Map preserve order, so we would need to use an Array for doing so. What I'm not so sure is about keep using an array for each entry or replace for a Set...

piranna avatar May 16 '22 06:05 piranna