{"id":25188613,"url":"https://github.com/montasim/mime-types-lite","last_synced_at":"2026-03-05T14:31:08.161Z","repository":{"id":274609131,"uuid":"923435172","full_name":"montasim/mime-types-lite","owner":"montasim","description":"A collection of commonly used MIME types for applications. This package helps standardize MIME type handling in your project.","archived":false,"fork":false,"pushed_at":"2026-02-28T08:23:52.000Z","size":514,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-28T13:59:19.146Z","etag":null,"topics":["extension","file","lite","mime","mime-db","mimetypes","type","types","util"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mime-types-lite","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/montasim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-28T08:37:08.000Z","updated_at":"2026-02-28T08:23:56.000Z","dependencies_parsed_at":"2025-05-07T16:26:47.082Z","dependency_job_id":"4c9ce3f9-d70a-435c-ab4a-2ad8157954fa","html_url":"https://github.com/montasim/mime-types-lite","commit_stats":null,"previous_names":["montasim/mime-types-lite"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/montasim/mime-types-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montasim%2Fmime-types-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montasim%2Fmime-types-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montasim%2Fmime-types-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montasim%2Fmime-types-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/montasim","download_url":"https://codeload.github.com/montasim/mime-types-lite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montasim%2Fmime-types-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30130304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T12:40:50.676Z","status":"ssl_error","status_checked_at":"2026-03-05T12:39:32.209Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","file","lite","mime","mime-db","mimetypes","type","types","util"],"created_at":"2025-02-09T20:29:30.313Z","updated_at":"2026-03-05T14:31:08.150Z","avatar_url":"https://github.com/montasim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mime-types-lite\n\n\u003c!-- repository summary badges start --\u003e\n\u003cdiv\u003e\n    \u003cimg alt=\"NPM Version\" src=\"https://badgen.net/npm/v/mime-types-lite?label=version\u0026labelColor=EB008B\u0026color=00B8B5\"\u003e\n    \u003cimg alt=\"NPM Downloads\" src=\"https://badgen.net/npm/dm/mime-types-lite?label=downloads\u0026labelColor=EB008B\u0026color=00B8B5\"\u003e\n    \u003cimg alt=\"NPM Package\" src=\"https://badgen.net/npm/license/mime-types-lite?label=license\u0026labelColor=EB008B\u0026color=00B8B5\"\u003e\n\u003c/div\u003e\n\u003c!-- repository summary badges end --\u003e\n\nThe [mime-types-lite](https://www.npmjs.com/package/mime-types-lite) is a lightweight and comprehensive utility providing standardized MIME types for applications. It simplifies the handling of file format identification by offering predefined constants, ensuring clarity and consistency in file processing and serving.\n\n🌐 **Demo:** [https://mime-types-lite-demo.netlify.app/](https://mime-types-lite-demo.netlify.app/)\n\n## Table of Contents\n\n- [Key Features](#key-features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Supported MIME Types](#supported-mime-types)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n- [FAQs](#faqs)\n\n---\n\n## Key Features\n\n1. **Predefined MIME Types:** Provides a comprehensive set of MIME types for easy reference.\n2. **TypeScript Support:** Includes strong type definitions for enhanced code safety and developer experience.\n3. **Immutable Constants:** Ensures MIME types cannot be modified, preventing unintended changes.\n4. **Lightweight \u0026 Efficient:** Minimal footprint with high performance.\n5. **Easy Integration:** Seamlessly integrates with any Node.js or TypeScript-based project.\n\n---\n\n## Installation\n\nTo install the package, run the following command:\n\n```bash\nnpm install mime-types-lite\n```\n\nor\n\n```bash\nyarn add mime-types-lite\n```\n\nor\n\n```bash\npnpm add mime-types-lite\n```\n\nor\n\n```bash\nbun add mime-types-lite\n```\n\n---\n\n## Usage\n\n### JavaScript CommonJS Example\n\n```javascript\nconst mimeTypesLite = require('mime-types-lite');\n\nconsole.log(mimeTypesLite.JSON); // Outputs: application/json\n```\n\n### JavaScript ESM Example\n\n```javascript\nimport mimeTypesLite from 'mime-types-lite';\n\nconsole.log(mimeTypesLite.JSON); // Outputs: application/json\n\n// TypeScript example:\nimport mimeTypesLite from 'mime-types-lite';\n\nconst fileType = 'JSON';\nconsole.log(mimeTypesLite[fileType]); // Outputs: application/json\n```\n\n### TypeScript ESM Example\n\n```typescript\nimport mimeTypesLite, { MimeType } from 'mime-types-lite';\n\nconsole.log(mimeTypesLite.JSON); // Outputs: application/json\n\n// TypeScript example:\nconst fileType: MimeType = 'JSON';\nconsole.log(mimeTypesLite[fileType]); // Outputs: application/json\n```\n\n---\n\n## Supported MIME Types\n\n### **Document MIME Types**\n\n- `EPUB`: `application/epub+zip`\n- `TEX`: `application/x-tex`\n- `PPT`: `application/vnd.ms-powerpoint`\n- `PPTX`: `application/vnd.openxmlformats-officedocument.presentationml.presentation`\n- `ODT`: `application/vnd.oasis.opendocument.text`\n- `ODS`: `application/vnd.oasis.opendocument.spreadsheet`\n- `RTF`: `application/rtf`\n- `DOC`: `application/msword`\n- `DOCX`: `application/vnd.openxmlformats-officedocument.wordprocessingml.document`\n- `XLS`: `application/vnd.ms-excel`\n- `XLSX`: `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`\n- `PDF`: `application/pdf`\n- `MD`: `text/markdown`\n- `TXT`: `text/plain`\n- `CSV`: `text/csv`\n\n### **Image MIME Types**\n\n- `XCF`: `image/x-xcf`\n- `PSD`: `image/vnd.adobe.photoshop`\n- `JP2`: `image/jp2`\n- `AVIF`: `image/avif`\n- `HEIC`: `image/heic`\n- `WEBP`: `image/webp`\n- `JPG`: `image/jpeg`\n- `JPEG`: `image/jpeg`\n- `PNG`: `image/png`\n- `ICO`: `image/x-icon`\n- `GIF`: `image/gif`\n- `BMP`: `image/bmp`\n- `TIFF`: `image/tiff`\n- `SVG`: `image/svg+xml`\n\n### **Video MIME Types**\n\n- `MKV`: `video/x-matroska`\n- `FLV`: `video/x-flv`\n- `WMV`: `video/x-ms-wmv`\n- `MOV`: `video/quicktime`\n- `WEBM`: `video/webm`\n- `AVI`: `video/avi`\n- `MPEG`: `video/mpeg`\n- `MP4`: `video/mp4`\n\n### **Audio MIME Types**\n\n- `AMR`: `audio/amr`\n- `MIDI`: `audio/midi`\n- `FLAC`: `audio/flac`\n- `OGG`: `audio/ogg`\n- `AAC`: `audio/aac`\n- `MP3`: `audio/mpeg`\n- `WAV`: `audio/wav`\n\n### **Archive MIME Types**\n\n- `TAR`: `application/x-tar`\n- `GZ`: `application/gzip`\n- `SEVEN_ZIP`: `application/x-7z-compressed`\n- `ZIP`: `application/zip`\n- `RAR`: `application/vnd.rar`\n- `BZ2`: `application/x-bzip2`\n\n### **Web-related MIME Types**\n\n- `ICS`: `text/calendar`\n- `ATOM`: `application/atom+xml`\n- `RSS`: `application/rss+xml`\n- `WASM`: `application/wasm`\n- `YAML`: `application/x-yaml`\n- `GRAPHQL`: `application/graphql`\n- `URL_ENCODED`: `application/x-www-form-urlencoded`\n- `JSON`: `application/json`\n- `XML`: `application/xml`\n- `JS`: `application/javascript`\n- `CSS`: `text/css`\n- `HTML`: `text/html`\n\n### **Font MIME Types**\n\n- `WOFF`: `font/woff`\n- `WOFF2`: `font/woff2`\n- `TTF`: `font/ttf`\n- `OTF`: `font/otf`\n\n---\n\n## License\n\n[![by-nc-nd/4.0](https://licensebuttons.net/l/by-nc-nd/4.0/88x31.png)](https://creativecommons.org/licenses/by-nc-nd/4.0/)\n\nThis project is licensed under the **Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)**.\n\n### You are free to:\n\n- **Share** — Copy and redistribute the material in any medium or format.\n\n### Under the following terms:\n\n- **Attribution** — You must give appropriate credit, provide a link to the license, and indicate if changes were made.\n- **NonCommercial** — You may not use the material for commercial purposes.\n- **NoDerivatives** — If you remix, transform, or build upon the material, you may not distribute the modified material.\n\nFor more details, please visit the [Creative Commons License Page](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n\n---\n\n## Acknowledgments\n\nSpecial thanks to the following resources:\n\n1. **MDN Web Docs** - Comprehensive MIME type references.\n2. **Node.js Express Documentation** - Guidance on handling MIME types in HTTP responses.\n3. **TypeScript Docs** - Best practices for defining and using type-safe constants.\n\n---\n\n## FAQs\n\n### 1. **How do I determine the correct MIME type for my file?**\n\nMIME types are categorized based on their format. Documents, images, videos, audio, and archives each have their respective MIME types. Refer to the [Supported MIME Types](#supported-mime-types) section for details.\n\n### 2. **Can I extend this library with custom MIME types?**\n\nNo, the constants are immutable and follow the official MIME type standards. If needed, you can create a wrapper module to include your custom MIME types.\n\n### 3. **How do I uninstall the package?**\n\nYou can remove the package by running:\n\n```bash\nnpm uninstall mime-types-lite\n```\n\nor\n\n```bash\nyarn remove mime-types-lite\n```\n\nor\n\n```bash\npnpm remove mime-types-lite\n```\n\nor\n\n```bash\nbun remove mime-types-lite\n```\n\n---\n\n## Author\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/95298623?v=4\" width=\"100px\" alt=\"Moon\"\u003e\n      \u003ca href=\"https://github.com/montasim\"\u003e\n        \u003cbr\u003e\n          Ｍ♢ＮＴΛＳＩＭ\n        \u003cbr\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmontasim%2Fmime-types-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmontasim%2Fmime-types-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmontasim%2Fmime-types-lite/lists"}