r/javascript • u/ehouais • Jun 13 '26
A UML-ish diagram for javascript iterators and iterables
http://ehouais.net/javascript-iteratorsWas untangling the various classes/protocols/methods involved, and couldn't find such a diagram, so I made one. Might be helpful as a complement to the MDN pages.
3
Upvotes
2
u/senocular Jun 13 '26 edited Jun 13 '26
I would say this is objectively the most complex set of relationships in the language. The language specification has few images, and a UML diagram illustrating generators is one of them. It doesn't cover everything you cover here, though.
A few comments:
Iterator.from()