Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/benmerckx/mime

Packages mime-db for haxelib
https://github.com/benmerckx/mime

Last synced: 20 days ago
JSON representation

Packages mime-db for haxelib

Awesome Lists containing this project

README

        

# mime

[![Build Status](https://travis-ci.org/benmerckx/mime.svg?branch=master)](https://travis-ci.org/benmerckx/mime)

Packages [mime-db](https://github.com/jshttp/mime-db) for haxelib

```haxe
Mime.lookup('/path/to/file.txt'); // text/plain
Mime.lookup('file.txt'); // text/plain
Mime.lookup('.TXT'); // text/plain
Mime.lookup('htm'); // text/html

Mime.extension('text/html'); // html
Mime.extension('application/pdf'); // pdf

Mime.db.get('text/html'); // {compressible => true, extensions => [html,htm,shtml], source => iana}
```