https://github.com/calibr/node-file-kind
Detects the kind of a file by its mime type
https://github.com/calibr/node-file-kind
Last synced: 5 months ago
JSON representation
Detects the kind of a file by its mime type
- Host: GitHub
- URL: https://github.com/calibr/node-file-kind
- Owner: calibr
- Created: 2015-06-03T11:17:00.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T10:03:11.000Z (almost 6 years ago)
- Last Synced: 2025-10-30T15:49:34.491Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Installation
`npm install file-kind`
## Usage
```js
var fileKind = require("file-kind");
console.log(fileKind("image/png")); // "image"
```
## Possible kinds
- `image`
- `video`
- `audio`
- `archive`
- `doc` - for office documents like Excel, Doc, etc.
- `file` - for other files that do not fit other categories