1.0.0 • Published 5 years ago
mmmagic-type v1.0.0
mmmagic-type
Detect file type with mmmagic and mime.
Install
npm i mmmagic-type
Usage
import fs from 'fs'
import { detect } from 'mmmagic-type'
detect(fs.readFileSync('/path/to/file')).then(type => {
console.log(type)
// { ext: '', mime: '' }
})
1.0.0
5 years ago