@graphty/graphty-element / catalog / detectFormats
Function: detectFormats() ​
detectFormats(
input): readonlyFormatId[]
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 ​
The file name, the first bytes, or both.
Returns ​
readonly FormatId[]
The format ids, best first. Empty when nothing recognises the file.