# system-mime

> Get the (system) mimetype of a file (Linux)

Latest version **0.0.1** (published 2014-08-06) · 0 weekly downloads

## Install

```sh
npm install system-mime
pnpm add system-mime
yarn add system-mime
bun add system-mime
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-08-06 |
| First published | 2014-08-06 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | rawiroaisen |
| Keywords | mime, mimetype, system, linux |

## Links

- npm: https://www.npmjs.com/package/system-mime
- Repository: git@github.com:rawiroaisen/node-system-mime
- Homepage: https://github.com/rawiroaisen/node-system-mime
- Issues: https://github.com/rawiroaisen/node-system-mime/issues
- npm.io page: https://npm.io/package/system-mime

## Dependencies (1)

- [xdg-env](https://npm.io/package/xdg-env.md) *

## Recent versions

- 0.0.1 (latest) — 2014-08-06

## README

# Node system-mime
Get the mimetype of a file in the xdg way.<br>
For more info see http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html

## Install
```
npm install system-mime
```

## Usage
```js
var mime = require('system-mime')

mime.lookup('file.txt') // 'text/plain'
mime.lookup('file.tar.gz') // 'application/x-compressed-tar'
mime.lookup('/path/file.tar') // 'application/x-tar'
mime.lookup('makefile') // 'text/x-makefile'

mime.lookup('unknown-type') // null

mime.fallback_type = 'text/plain' // (defaults to null)
mime.lookup('unknown-type') // 'text/plain'

mime.lookup('unknown-type', fallback) // fallback
```

## TODO
Read magic data

---
_Source: https://npm.io/package/system-mime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
