Optional content: stringThe content as a file path (e.g. ../folder/file.txt) or raw content
Optional format: stringThe format as a media type (e.g. text/plain) or extension name (e.g. txt)
true if attempting to find a match for an output file
A promise that resolves to the Codec to use
Generated using TypeDoc
Match the codec based on file name, extension name, media type or by content sniffing.
Iterates through the list of codecs and returns the first that matches based on any of the above criteria.
If the supplied format contains a forward slash then it is assumed to be a media type, otherwise an extension name.
If trying to find a codec for an output, then
contentis more likely to be a path than actual content. This is passed through tovfile.isPathfor detection.