Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • BasicRepresentation

Implements

Index

Constructors

Properties

Accessors

Constructors

constructor

Properties

Readonly binary

binary: boolean

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

Readonly data

data: Guarded<Readable>

The raw data stream for this representation.

Readonly metadata

The corresponding metadata.

Accessors

isEmpty

  • get isEmpty(): boolean