Open rauschma opened 9 years ago
Adding this to a specialized Set
I have was as easy as (other code omitted for brevity):
import {Set as CollectionsSet} from 'collections/set'
class ParametersSet extends CollectionsSet {
[Symbol.iterator]() {
return this.iterate()
}
}
It would be awesome to have this natively implemented in all collections though.
Among other changes: If it is there, you should use
Symbol.iterator
as a property key.Long-term, it may also make sense to rename
Iterator
, in order to avoid confusion with the built-in API.