Module: @e2fyi/streams

Classes

DocumentTagger
MongooseStream

Type Definitions

DocumentTaggerSettings

Settings for DocumentTagger.

Type:
  • Object
Properties:
Name Type Description
autoIncrement String

The auto-increment field to tag onto the stream object.

ignoreNonObject Boolean

If true, no errors will be emitted when the chunk in the stream cannot be parsed into Object.

readableObjectMode Boolean

If true, Object will be emitted from the stream, otherwise a String or Buffer representation or will emitted instead.

objectMode Boolean

If true, Object will be emitted from the stream, otherwise a String or Buffer representation or will emitted instead. Overwrites writableObjectMode.

filter function

Function to filter the objects in the stream. Return true to keep the object.

mutate function | Object

Function or Object to mutate the stream. If an Object is provided, each stream object will be mutated with the Object.assign(streamObj, mutateObj).

Source:

MongooseStreamSettings

Settings for MongooseStream.

Type:
  • Object
Properties:
Name Type Attributes Default Description
itemWaterMark Number <optional>
50

The number of item collected before writing to mongodb.

passThrough Boolean

If false nothing will be emitted from the stream.

model mongoose.Model

mongoose Model.

Source: