Class: MultiTransformIterator

asynciterator~MultiTransformIterator(sourceopt, optionsopt)

An iterator that generates items by transforming each item of a source with a different iterator.

Constructor

new MultiTransformIterator(sourceopt, optionsopt)

Creates a new MultiTransformIterator.

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

The source this iterator generates items from

options object | function <optional>

Settings of the iterator, or the transformation function

Properties
Name Type Attributes Default Description
maxbufferSize integer <optional>
4

The maximum number of items to keep in the buffer

autoStart boolean <optional>
true

Whether buffering starts directly after construction

source module:asynciterator.AsyncIterator <optional>

The source this iterator generates items from

offset integer <optional>

The number of items to skip

limit integer <optional>

The maximum number of items

filter function <optional>

A function to synchronously filter items from the source

map function <optional>

A function to synchronously transform items from the source

transform function <optional>

A function to asynchronously transform items from the source

optional boolean <optional>
false

If transforming is optional, the original item is pushed when its mapping yields null or its transformation yields no items

multiTransform function <optional>

A function to asynchronously transform items to iterators from the source

prepend Array | module:asynciterator.AsyncIterator <optional>

Items to insert before the source items

append Array | module:asynciterator.AsyncIterator <optional>

Items to insert after the source items

Extends

  • module:asynciterator.TransformIterator

Methods

_createTransformer(item) → {module:asynciterator.AsyncIterator}

Creates a transformer for the given item.

Parameters:
Name Type Description
item object

The last read item from the source

Returns:

An iterator that transforms the given item

Type
module:asynciterator.AsyncIterator