Class ContentTypeReplacer

A RepresentationConverter that changes the content type but does not alter the representation.

Useful for when a content type is binary-compatible with another one; for instance, all JSON-LD files are valid JSON files.

Hierarchy

Constructors

Properties

contentTypeMap: Record<string, ValuePreferences> = {}

Methods

  • Find a replacement content type that matches the preferences, or throws an error if none was found.

    Parameters

    Returns Promise<string>