All Projects → data-uri → mimer

data-uri / mimer

Licence: other
A simple Mime type getter

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to mimer

ruby-magic
Simple interface to libmagic for Ruby Programming Language
Stars: ✭ 23 (+53.33%)
Mutual labels:  mime-types
Mime
Map filenames to MIME types
Stars: ✭ 21 (+40%)
Mutual labels:  mime-types
Fileio.jl
Main Package for IO, loading all different kind of files
Stars: ✭ 133 (+786.67%)
Mutual labels:  mime-types
Ruby Mime Types
Ruby MIME type registry library
Stars: ✭ 288 (+1820%)
Mutual labels:  mime-types
Mime Types
The ultimate javascript content-type utility.
Stars: ✭ 865 (+5666.67%)
Mutual labels:  mime-types
Filetype
Fast, dependency-free, small Go package to infer the binary file type based on the magic numbers signature
Stars: ✭ 1,278 (+8420%)
Mutual labels:  mime-types
mimetypes
Erlang MIME types library
Stars: ✭ 77 (+413.33%)
Mutual labels:  mime-types
php-mimetyper
PHP mime type and extension mapping library: built with jshttp/mime-db, compatible with Symfony and Laravel
Stars: ✭ 21 (+40%)
Mutual labels:  mime-types
Sixarm ruby magic number type
SixArm.com » Ruby » MagicNumberType infers a data type from the data's leading bytes
Stars: ✭ 13 (-13.33%)
Mutual labels:  mime-types
Apaxy
a simple, customisable theme for your apache directory listing
Stars: ✭ 1,672 (+11046.67%)
Mutual labels:  mime-types
Mimetype
A fast golang library for MIME type and file extension detection, based on magic numbers
Stars: ✭ 452 (+2913.33%)
Mutual labels:  mime-types
Mime
Shared MIME-info database in D programming language
Stars: ✭ 7 (-53.33%)
Mutual labels:  mime-types
Mime
The Hoa\Mime library.
Stars: ✭ 100 (+566.67%)
Mutual labels:  mime-types
Filepicker
🔥🔥🔥Android文件、图片选择器,可按文件夹查找,文件类型查找,支持自定义相机
Stars: ✭ 265 (+1666.67%)
Mutual labels:  mime-types
Yagmail
Send email in Python conveniently for gmail using yagmail
Stars: ✭ 2,169 (+14360%)
Mutual labels:  mime-types
Mime
.NET wrapper for libmagic
Stars: ✭ 51 (+240%)
Mutual labels:  mime-types
Mog
A different take on the UNIX tool cat
Stars: ✭ 62 (+313.33%)
Mutual labels:  mime-types
enough mail
IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Stars: ✭ 78 (+420%)
Mutual labels:  mime-parser
mimesniff
MIME Sniffing Standard
Stars: ✭ 89 (+493.33%)
Mutual labels:  mime-types
Swime
🗂 Swift MIME type checking based on magic bytes
Stars: ✭ 119 (+693.33%)
Mutual labels:  mime-types

Mimer Build Status install size

A file extension to MIME type module. Uses mime-db data but with zero dependencies.

Getting started

npm install mimer or npx mimer <file>.

Module

const mimer = require('mimer');

mimer('.pdf'); // -> "application/pdf"
mimer('pdf'); // -> "application/pdf"
mimer('../readme.pdf'); // -> "application/pdf"
mimer('pedefe'); // -> "application/octet-stream"

Extension Map

const mimer = require('mimer');
const mimerMap = require('mimer/map');

mimerMap.get('pdf'); // -> "application/pdf"
mimerMap.set('graphql', 'application/graphql');
mimer('content.graphql'); // -> "application/graphql"

Safe mode

In case you want to avoid changes on original Map for safety.

const mimer = require('mimer/safe');
const mimerMap = require('mimer/map');

mimerMap.set('graphql', 'application/graphql');
mimer('content.graphql'); // -> "application/octet-stream"

CLI

npm install -g mimer
mimer readme.pdf

or just

npx mimer readme.pdf

Contribute

Just create a new Github Codespace or:

$ git clone https://github.com/data-uri/mimer.git
$ cd mimer
$ npm i
$ npm test

Changelog.

License

MIT License (c) Helder Santana

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].