RubenVerborgh / AsyncIterator

An asynchronous iterator library for advanced object pipelines in JavaScript
https://rubenverborgh.github.io/AsyncIterator/docs/
Other
49 stars 7 forks source link

Symbol for _destination property #78

Closed jacoscaz closed 2 years ago

jacoscaz commented 2 years ago

This PR complements #63 (which should be merged first) by renaming the _destination property to a dedicated Symbol, guaranteed to be unique, so that we can never trigger property collisions when setting _destination on externally-provided source objects for which isAsyncReadable(source) === true at https://github.com/RubenVerborgh/AsyncIterator/blob/159ed2b09e599d03d574aec2c98b40ae416d168b/asynciterator.ts#L2030-L2043 .

RubenVerborgh commented 2 years ago

Thanks, @jacoscaz, I'm happy to take it from here!