file-is
Check the mime type of a file or binary. A thin wrapper around type-is and mmmagic.
const is =
API
is(String | Buffer | Stream, types...).then( type => )
The first input can be a string for the filename or a buffer/stream for the actual contents. The content can not be a string because then there's no point in using this library.
types
is an array or argument of types.
See typeis.is() for more details.
type
is the first match in the list of types.