Show:

ResizeStream is a stream that listens to and emits resize events.

Constructor

Streams.ResizeStream

(
  • [options]
)
private

Parameters:

  • [options] Object optional

    Options

    • [resize] Function optional

      Custom logic to map the resize event

Item Index

Methods

Methods

filter

(
  • filterFn
)

Inherited from Streams.SimpleStream:

Filter converts the current stream into a new stream that only emits if the filter condition is satisfied. The function should return a Boolean.

Parameters:

  • filterFn Function
    Function to filter event payload

lift

() static

Extends SimpleStream.lift

map

(
  • mapperFn
)

Inherited from Streams.SimpleStream:

Map converts the current stream into a new stream with a modified (mapped) data payload.

Parameters:

  • mapperFn Function
    Function to map event payload

merge

(
  • streams
)
private static

Batches resize events for provided object of streams in {key : stream} pairs. Emits one resize event per Engine cycle.

Parameters:

  • streams Object

    Dictionary of resize streams

pluck

(
  • key
)

Inherited from Streams.SimpleStream:

Pluck is an opinionated mapper. It projects a Stream onto one of its return values. Useful if a Stream returns an array or an object.

Parameters:

split

(
  • splitterFn
)

Inherited from Streams.SimpleStream:

Split maps one of several streams based on custom logic. The function should return an EventEmitter.

Parameters: