Socket
Socket
Sign inDemoInstall

mimer

Package Overview
Dependencies
0
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mimer

A simple Mime type getter


Version published
Weekly downloads
216K
decreased by-3.97%
Maintainers
3
Install size
88.7 kB
Created
Weekly downloads
 

Readme

Source

Mimer Build Status NPM version

A simple MIME type getter built on top of Node.js.

MODULE

Browser version:: Minified (amd and CommonJS ready) Source

Node.js version: npm install mimer into your project

Getting started

// node and browserify
const Mimer = require('mimer');

// amd (Require.js and etc)
require('path/to/mimer', function (Mimer) {});

// browser (through script tag)
window.Mimer
Get a MIME type
Mimer('file.css'); // => "text/css"

// or
var mime = new Mimer();
mime.get('file.css');  // => "text/css"
Set a MIME type
var mime = new Mimer();

mime.set('.monster', 'movie/thriller')
	.get('zombie.monster');
	// => "movie/thriller"

mime.set(['.rctycoon','.simcity'], 'cms/game');
mime.get('/land/park.rctycoon'); // => "cms/game"
mime.get('maps/city.simcity'); // => "cms/game"

CLIENT

npm install -g mimer (it may require Root privileges)

pritting a mime type

$ mimer brand.png

DEVELOPING

$ make install
$ make test

Build web version with:

$ make build

If you'd like to test the full process including npm installer, just run:

$ make fulltest

Release notes

See more in Releases section.

License

MIT License (c) Helder Santana

Keywords

FAQs

Last updated on 03 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc