Map of content type patterns and content types to replace them by.
Private
Readonly
contentChecks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.
Input that could potentially be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Gets the output content types this converter can convert the input type to, mapped to a numerical priority.
Private
getFind a replacement content type that matches the preferences, or throws an error if none was found.
Changes the content type on the representation.
Helper function that first runs canHandle followed by handle. Throws the error of canHandle if the data cannot be handled, or returns the result of handle otherwise.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
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.