This package has been deprecated

Author message:

use @litert/mime instead

@litert/mime-types
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

mime-types

npm version npm version License node GitHub issues GitHub Releases GitHub Pre-Releases

Get MIME type based on file name.

Installation

In the Node.js environment, you can install directly using NPM:

$ npm i @litert/mime-types --save

Or install the developing (unstable) version for newest features:

$ npm i @litert/mime-types@dev --save

API

Demo code is written using TypeScript.

import * as mime from "@litert/mime-types";

mime.get("hello.json");         // application/json
mime.get(".html");              // text/html
mime.get("css");                // text/css
mime.get("hi/baby.js");         // application/javascript
mime.get("/root/down/pk.zip");  // application/zip
mime.get("ext.dodooh");         // application/octet-stream

License

This library is published under Apache-2.0 license.

Readme

Keywords

Package Sidebar

Install

npm i @litert/mime-types

Weekly Downloads

1

Version

0.0.3

License

Apache-2.0

Unpacked Size

57.7 kB

Total Files

9

Last publish

Collaborators

  • fenying
  • hanguoshuai