Skip to content

shimohq/node-mmmagic-type

Repository files navigation

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: '' }
})

About

Detect file type with mmmagic and mime.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published