Class: ClonedIterator

asynciterator~ClonedIterator(sourceopt)

An iterator that copies items from another iterator.

Constructor

new ClonedIterator(sourceopt)

Creates a new ClonedIterator.

Parameters:
Name Type Attributes Description
source module:asynciterator.AsyncIterator | Readable <optional>

The source this iterator copies items from

Extends

  • module:asynciterator.TransformIterator

Methods

(protected) _validateSource(source, allowDestination)

Validates whether the given iterator can be used as a source.

Parameters:
Name Type Default Description
source object

The source to validate

allowDestination boolean false

Whether the source can already have a destination