Hereby we check file structure header to determine file type. It's more reliable than the way which maps mime type by extension name.
Inspired by magic file. File signatures is from garykessler
$ bin/index.js --file path/to/the/file
import determine from './lib/determine'
let {mime} = determine([0x78, 0x01, 0x73, 0x0D, 0x62, 0x62, 0x60, ...])
- Fill up magic data
- Unit tests