Class: SimpleTransformIterator

asynciterator~SimpleTransformIterator(sourceopt, optionsopt)

An iterator that generates items based on a source iterator and simple transformation steps passed as arguments.

Constructor

new SimpleTransformIterator(sourceopt, optionsopt)

Creates a new SimpleTransformIterator.

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

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