An open API service indexing awesome lists of open source software.

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

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