Function isPlainIterator

Checks if value is a plain Iterator.

  • It includes any objects/realObjects with Symbol.iterator() as well as map.entries() & set.entries() etc.
  • But it excludes:
    • Standard Iterables (that are also happen to be an Iterator) like Array, Set & Map, TypedArray that have their own z.type.
    • Async Iterators
    • It also excludes Generator & AsyncGenerator, although Generators are practically Iterators also (you can use isGenerator() / isAsyncGenerator() for that).