Skip to content

@graphty/graphty-element / catalog / detectFormats

Function: detectFormats() ​

detectFormats(input): readonly FormatId[]

Defined in: graphty-element/src/catalog/detect.ts:184

Every format that could read this file, best first.

A ranked list rather than one answer, because an extension two formats claim is a real ambiguity: a consumer can offer both rather than being handed a guess with the alternative thrown away.

Parameters ​

input ​

DetectionInput

The file name, the first bytes, or both.

Returns ​

readonly FormatId[]

The format ids, best first. Empty when nothing recognises the file.