Detect the file type of a file or stdin
npm install --global file-type-cli
$ file-type --help
Usage
$ file-type <filename>
$ file-type < <filename>
Example
$ file-type unicorn.png
png
image/png
- file-type - API for this module