Class with various constructors to facilitate creating a representation.

A representation consists of 1) data, 2) metadata, and 3) a binary flag to indicate whether the data is a binary stream or an object stream.

  1. The data can be given as a stream, array, or string.
  2. The metadata can be specified as one or two parameters that will be passed to the RepresentationMetadata constructor.
  3. The binary field is optional, and if not specified, is determined from the content type inside the metadata.

Implements

Constructors

Properties

Accessors

Constructors

Properties

binary: boolean

Whether the data stream consists of binary/string chunks (as opposed to complex objects).

data: Guarded<Readable>

The raw data stream for this representation.

The corresponding metadata.

Accessors