mime-types-lite 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -6
- package/build/index.cjs.d.ts +367 -0
- package/build/index.cjs.js +364 -0
- package/package.json +51 -14
package/README.md
CHANGED
|
@@ -44,24 +44,29 @@ npm install mime-types-lite
|
|
|
44
44
|
|
|
45
45
|
## Usage
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### CommonJS
|
|
48
48
|
|
|
49
49
|
```javascript
|
|
50
|
-
|
|
50
|
+
const mimeTypesLite = require('mime-types-lite');
|
|
51
51
|
|
|
52
52
|
console.log(mimeTypesLite.JSON); // Outputs: application/json
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
###
|
|
55
|
+
### Module (ESM)
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
import mimeTypesLite from 'mime-types-lite';
|
|
59
|
+
|
|
60
|
+
console.log(mimeTypesLite.JSON); // Outputs: application/json
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
// TypeScript example:
|
|
58
63
|
import mimeTypesLite, { MimeType } from 'mime-types-lite';
|
|
59
64
|
|
|
60
65
|
const fileType: MimeType = 'JSON';
|
|
61
66
|
console.log(mimeTypesLite[fileType]); // Outputs: application/json
|
|
62
67
|
```
|
|
63
68
|
|
|
64
|
-
###
|
|
69
|
+
### Example Usage in an Express.js Application (ESM)
|
|
65
70
|
|
|
66
71
|
```javascript
|
|
67
72
|
import mimeTypesLite from 'mime-types-lite';
|
|
@@ -171,7 +176,21 @@ app.listen(3000, () => console.log('Server running on port 3000'));
|
|
|
171
176
|
|
|
172
177
|
## License
|
|
173
178
|
|
|
174
|
-
|
|
179
|
+
[](https://creativecommons.org/licenses/by-nc-nd/4.0/)
|
|
180
|
+
|
|
181
|
+
This project is licensed under the **Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)**.
|
|
182
|
+
|
|
183
|
+
### You are free to:
|
|
184
|
+
|
|
185
|
+
- **Share** — Copy and redistribute the material in any medium or format.
|
|
186
|
+
|
|
187
|
+
### Under the following terms:
|
|
188
|
+
|
|
189
|
+
- **Attribution** — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
|
|
190
|
+
- **NonCommercial** — You may not use the material for commercial purposes.
|
|
191
|
+
- **NoDerivatives** — If you remix, transform, or build upon the material, you may not distribute the modified material.
|
|
192
|
+
|
|
193
|
+
For more details, please visit the [Creative Commons License Page](https://creativecommons.org/licenses/by-nc-nd/4.0/).
|
|
175
194
|
|
|
176
195
|
---
|
|
177
196
|
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Defines the various MIME types used in the application.
|
|
3
|
+
* This module exports an object that contains the different MIME types
|
|
4
|
+
* the application can handle. These MIME types are used to identify the format of data being processed or served.
|
|
5
|
+
*
|
|
6
|
+
* @module constants/mimeTypesLite
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
* @license CC BY-NC-ND 4.0
|
|
9
|
+
*
|
|
10
|
+
* @contact Mohammad Montasim -Al- Mamun Shuvo
|
|
11
|
+
* @created 2025-01-28
|
|
12
|
+
* @contactEmail montasimmamun@gmail.com
|
|
13
|
+
* @contactGithub https://github.com/montasim
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* An object representing different MIME types.
|
|
17
|
+
* @enum {string}
|
|
18
|
+
*/
|
|
19
|
+
declare const mimeTypesLite: Readonly<{
|
|
20
|
+
/** Document MIME Types */
|
|
21
|
+
/**
|
|
22
|
+
* MIME Type for ePub files.
|
|
23
|
+
* Example: Digital books are distributed in `.epub` format for eReaders.
|
|
24
|
+
*/
|
|
25
|
+
EPUB: "application/epub+zip";
|
|
26
|
+
/**
|
|
27
|
+
* MIME Type for Latex files.
|
|
28
|
+
* Example: Documents written in LaTeX are saved in `.tex` format.
|
|
29
|
+
*/
|
|
30
|
+
TEX: "application/x-tex";
|
|
31
|
+
/**
|
|
32
|
+
* MIME Type for Microsoft PowerPoint files (`.ppt` files).
|
|
33
|
+
* Example: Presentations are shared in `.ppt` format.
|
|
34
|
+
*/
|
|
35
|
+
PPT: "application/vnd.ms-powerpoint";
|
|
36
|
+
/**
|
|
37
|
+
* MIME Type for Microsoft PowerPoint files in the Office Open XML format (`.pptx` files).
|
|
38
|
+
* Example: Presentations are shared in `.pptx` format.
|
|
39
|
+
*/
|
|
40
|
+
PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
41
|
+
/**
|
|
42
|
+
* MIME Type for OpenDocument Text files.
|
|
43
|
+
* Example: Documents created in LibreOffice Writer are saved as `.odt` files.
|
|
44
|
+
*/
|
|
45
|
+
ODT: "application/vnd.oasis.opendocument.text";
|
|
46
|
+
/**
|
|
47
|
+
* MIME Type for OpenDocument Spreadsheet files.
|
|
48
|
+
* Example: Spreadsheets created in LibreOffice Calc are saved as `.ods` files.
|
|
49
|
+
*/
|
|
50
|
+
ODS: "application/vnd.oasis.opendocument.spreadsheet";
|
|
51
|
+
/**
|
|
52
|
+
* MIME Type for Rich Text Format (RTF) files.
|
|
53
|
+
* Example: Word processors can save documents as `.rtf` files for compatibility.
|
|
54
|
+
*/
|
|
55
|
+
RTF: "application/rtf";
|
|
56
|
+
/**
|
|
57
|
+
* MIME Type for Microsoft Word documents (`.doc` files).
|
|
58
|
+
* Example: A server serves `.doc` files for download.
|
|
59
|
+
*/
|
|
60
|
+
DOC: "application/msword";
|
|
61
|
+
/**
|
|
62
|
+
* MIME Type for Microsoft Word documents in the Office Open XML format (`.docx` files).
|
|
63
|
+
* Example: Exported reports are generated as `.docx` files.
|
|
64
|
+
*/
|
|
65
|
+
DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
66
|
+
/**
|
|
67
|
+
* MIME Type for Microsoft Excel files (`.xls` files).
|
|
68
|
+
* Example: Financial data is provided in `.xls` format.
|
|
69
|
+
*/
|
|
70
|
+
XLS: "application/vnd.ms-excel";
|
|
71
|
+
/**
|
|
72
|
+
* MIME Type for Microsoft Excel spreadsheets in the Office Open XML format (`.xlsx` files).
|
|
73
|
+
* Example: Data analytics tools export `.xlsx` files.
|
|
74
|
+
*/
|
|
75
|
+
XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
76
|
+
/**
|
|
77
|
+
* MIME Type for PDF files.
|
|
78
|
+
* Example: The application generates an invoice as a `.pdf` file for download.
|
|
79
|
+
*/
|
|
80
|
+
PDF: "application/pdf";
|
|
81
|
+
/**
|
|
82
|
+
* MIME Type for Markdown files.
|
|
83
|
+
* Example: Documentation files are stored and processed as `.md`.
|
|
84
|
+
*/
|
|
85
|
+
MD: "text/markdown";
|
|
86
|
+
/**
|
|
87
|
+
* MIME Type for Plain Text files.
|
|
88
|
+
* Example: A log file is served as a `.txt` file.
|
|
89
|
+
*/
|
|
90
|
+
TXT: "text/plain";
|
|
91
|
+
/**
|
|
92
|
+
* MIME Type for CSV files.
|
|
93
|
+
* Example: Exported reports are downloaded as `.csv` files.
|
|
94
|
+
*/
|
|
95
|
+
CSV: "text/csv";
|
|
96
|
+
/** Image MIME Types */
|
|
97
|
+
/**
|
|
98
|
+
* MIME Type for XCF files.
|
|
99
|
+
* Example: Images edited in GIMP are saved in `.xcf` format.
|
|
100
|
+
*/
|
|
101
|
+
XCF: "image/x-xcf";
|
|
102
|
+
/**
|
|
103
|
+
* MIME Type for Photoshop files.
|
|
104
|
+
* Example: Graphics are saved and edited in `.psd` format.
|
|
105
|
+
*/
|
|
106
|
+
PSD: "image/vnd.adobe.photoshop";
|
|
107
|
+
/**
|
|
108
|
+
* MIME Type for JPEG 2000 images.
|
|
109
|
+
* Example: High-quality images saved in `.jp2` format.
|
|
110
|
+
*/
|
|
111
|
+
JP2: "image/jp2";
|
|
112
|
+
/**
|
|
113
|
+
* MIME Type for AVIF images.
|
|
114
|
+
* Example: Modern compressed images saved in `.avif` format.
|
|
115
|
+
*/
|
|
116
|
+
AVIF: "image/avif";
|
|
117
|
+
/**
|
|
118
|
+
* MIME Type for HEIC images.
|
|
119
|
+
* Example: Photos captured by modern smartphones are saved as `.heic` files for better compression.
|
|
120
|
+
*/
|
|
121
|
+
HEIC: "image/heic";
|
|
122
|
+
/**
|
|
123
|
+
* MIME Type for WebP images.
|
|
124
|
+
* Example: Web servers deliver `.webp` images for optimized website performance.
|
|
125
|
+
*/
|
|
126
|
+
WEBP: "image/webp";
|
|
127
|
+
/**
|
|
128
|
+
* MIME Type for JPEG images.
|
|
129
|
+
* Example: User profile pictures are uploaded and served as `.jpeg` images.
|
|
130
|
+
*/
|
|
131
|
+
JPG: "image/jpeg";
|
|
132
|
+
/**
|
|
133
|
+
* MIME Type for JPEG images.
|
|
134
|
+
* Example: User profile pictures are uploaded and served as `.jpeg` images.
|
|
135
|
+
*/
|
|
136
|
+
JPEG: "image/jpeg";
|
|
137
|
+
/**
|
|
138
|
+
* MIME Type for PNG images.
|
|
139
|
+
* Example: A server serves `.png` files for website logos.
|
|
140
|
+
*/
|
|
141
|
+
PNG: "image/png";
|
|
142
|
+
/**
|
|
143
|
+
* MIME Type for ICO images.
|
|
144
|
+
* Example: A server provides a `.ico` file as the favicon for a website.
|
|
145
|
+
*/
|
|
146
|
+
ICO: "image/x-icon";
|
|
147
|
+
/**
|
|
148
|
+
* MIME Type for GIF images.
|
|
149
|
+
* Example: A messaging app serves `.gif` files for animated stickers.
|
|
150
|
+
*/
|
|
151
|
+
GIF: "image/gif";
|
|
152
|
+
/**
|
|
153
|
+
* MIME Type for BMP images.
|
|
154
|
+
* Example: Specialized imaging software processes `.bmp` files.
|
|
155
|
+
*/
|
|
156
|
+
BMP: "image/bmp";
|
|
157
|
+
/**
|
|
158
|
+
* MIME Type for TIFF images.
|
|
159
|
+
* Example: High-quality scanned documents are stored as `.tiff` files.
|
|
160
|
+
*/
|
|
161
|
+
TIFF: "image/tiff";
|
|
162
|
+
/**
|
|
163
|
+
* MIME Type for SVG images.
|
|
164
|
+
* Example: A website serves `.svg` files for scalable vector icons.
|
|
165
|
+
*/
|
|
166
|
+
SVG: "image/svg+xml";
|
|
167
|
+
/** Video MIME Types */
|
|
168
|
+
/**
|
|
169
|
+
* MIME Type for MKV videos.
|
|
170
|
+
* Example: High-quality video files saved in `.mkv` format.
|
|
171
|
+
*/
|
|
172
|
+
MKV: "video/x-matroska";
|
|
173
|
+
/**
|
|
174
|
+
* MIME Type for FLV videos.
|
|
175
|
+
* Example: Flash video files are distributed in `.flv` format.
|
|
176
|
+
*/
|
|
177
|
+
FLV: "video/x-flv";
|
|
178
|
+
/**
|
|
179
|
+
* MIME Type for WMV videos.
|
|
180
|
+
* Example: Windows Media videos are saved as `.wmv` files.
|
|
181
|
+
*/
|
|
182
|
+
WMV: "video/x-ms-wmv";
|
|
183
|
+
/**
|
|
184
|
+
* MIME Type for QuickTime videos.
|
|
185
|
+
* Example: Apple devices record videos in `.mov` format using QuickTime.
|
|
186
|
+
*/
|
|
187
|
+
MOV: "video/quicktime";
|
|
188
|
+
/**
|
|
189
|
+
* MIME Type for WebM videos.
|
|
190
|
+
* Example: Video sharing platforms provide `.webm` files for high-quality playback with smaller file sizes.
|
|
191
|
+
*/
|
|
192
|
+
WEBM: "video/webm";
|
|
193
|
+
/**
|
|
194
|
+
* MIME Type for AVI videos.
|
|
195
|
+
* Example: Desktop applications render `.avi` files for video editing.
|
|
196
|
+
*/
|
|
197
|
+
AVI: "video/avi";
|
|
198
|
+
/**
|
|
199
|
+
* MIME Type for MPEG videos.
|
|
200
|
+
* Example: Media players support playback of `.mpeg` files.
|
|
201
|
+
*/
|
|
202
|
+
MPEG: "video/mpeg";
|
|
203
|
+
/**
|
|
204
|
+
* MIME Type for MP4 videos.
|
|
205
|
+
* Example: Video streaming services serve `.mp4` files for playback.
|
|
206
|
+
*/
|
|
207
|
+
MP4: "video/mp4";
|
|
208
|
+
/** Audio MIME Types */
|
|
209
|
+
/**
|
|
210
|
+
* MIME Type for AMR audio files.
|
|
211
|
+
* Example: Voice recordings are stored in `.amr` format.
|
|
212
|
+
*/
|
|
213
|
+
AMR: "audio/amr";
|
|
214
|
+
/**
|
|
215
|
+
* MIME Type for MIDI audio files.
|
|
216
|
+
* Example: Musical instrument digital interface data saved as `.midi` files.
|
|
217
|
+
*/
|
|
218
|
+
MIDI: "audio/midi";
|
|
219
|
+
/**
|
|
220
|
+
* MIME Type for FLAC audio files.
|
|
221
|
+
* Example: Music enthusiasts use `.flac` files for lossless audio playback.
|
|
222
|
+
*/
|
|
223
|
+
FLAC: "audio/flac";
|
|
224
|
+
/**
|
|
225
|
+
* MIME Type for OGG audio files.
|
|
226
|
+
* Example: Streaming platforms deliver `.ogg` files for high-quality audio playback.
|
|
227
|
+
*/
|
|
228
|
+
OGG: "audio/ogg";
|
|
229
|
+
/**
|
|
230
|
+
* MIME Type for AAC audio files.
|
|
231
|
+
* Example: Advanced compression audio files are streamed as `.aac`.
|
|
232
|
+
*/
|
|
233
|
+
AAC: "audio/aac";
|
|
234
|
+
/**
|
|
235
|
+
* MIME Type for MP3 audio files.
|
|
236
|
+
* Example: Music streaming services provide `.mp3` files for playback.
|
|
237
|
+
*/
|
|
238
|
+
MP3: "audio/mpeg";
|
|
239
|
+
/**
|
|
240
|
+
* MIME Type for WAV audio files.
|
|
241
|
+
* Example: A sound editing application processes `.wav` files.
|
|
242
|
+
*/
|
|
243
|
+
WAV: "audio/wav";
|
|
244
|
+
/** Archive MIME Types */
|
|
245
|
+
/**
|
|
246
|
+
* MIME Type for TAR archives.
|
|
247
|
+
* Example: Files are compressed in `.tar` format for packaging.
|
|
248
|
+
*/
|
|
249
|
+
TAR: "application/x-tar";
|
|
250
|
+
/**
|
|
251
|
+
* MIME Type for GZ archives.
|
|
252
|
+
* Example: Files are compressed with GZIP and saved as `.gz` files.
|
|
253
|
+
*/
|
|
254
|
+
GZ: "application/gzip";
|
|
255
|
+
/**
|
|
256
|
+
* MIME Type for 7z compressed archives.
|
|
257
|
+
* Example: Compressed files are shared in `.7z` format.
|
|
258
|
+
*/
|
|
259
|
+
SEVEN_ZIP: "application/x-7z-compressed";
|
|
260
|
+
/**
|
|
261
|
+
* MIME Type for ZIP archives.
|
|
262
|
+
* Example: A server offers `.zip` archives for software downloads.
|
|
263
|
+
*/
|
|
264
|
+
ZIP: "application/zip";
|
|
265
|
+
/**
|
|
266
|
+
* MIME Type for RAR archives.
|
|
267
|
+
* Example: Compressed files are provided in `.rar` format for download.
|
|
268
|
+
*/
|
|
269
|
+
RAR: "application/vnd.rar";
|
|
270
|
+
/**
|
|
271
|
+
* MIME Type for BZ2 archives.
|
|
272
|
+
* Example: Files are compressed with BZIP2 and saved as `.bz2` files.
|
|
273
|
+
*/
|
|
274
|
+
BZ2: "application/x-bzip2";
|
|
275
|
+
/** Web-related MIME Types */
|
|
276
|
+
/**
|
|
277
|
+
* MIME Type for `.ics` calendar files.
|
|
278
|
+
* Example: Calendar events are shared in `.ics` format for scheduling.
|
|
279
|
+
*/
|
|
280
|
+
ICS: "text/calendar";
|
|
281
|
+
/**
|
|
282
|
+
* MIME Type for `.atom` feed files.
|
|
283
|
+
* Example: Websites syndicate content in `.atom` format for RSS readers.
|
|
284
|
+
*/
|
|
285
|
+
ATOM: "application/atom+xml";
|
|
286
|
+
/**
|
|
287
|
+
* MIME Type for `.rss` feed files.
|
|
288
|
+
* Example: Websites syndicate content in `.rss` format for RSS readers.
|
|
289
|
+
*/
|
|
290
|
+
RSS: "application/rss+xml";
|
|
291
|
+
/**
|
|
292
|
+
* MIME Type for `.wasm` WebAssembly files.
|
|
293
|
+
* Example: Servers deliver `.wasm` files to execute WebAssembly code in browsers.
|
|
294
|
+
*/
|
|
295
|
+
WASM: "application/wasm";
|
|
296
|
+
/**
|
|
297
|
+
* MIME Type for `.csv` with semicolon separator.
|
|
298
|
+
* Example: Data files saved as `.csv` with a semicolon instead of a comma as a separator.
|
|
299
|
+
*/
|
|
300
|
+
CSV_SEMICOLON: "text/csv+semicolon";
|
|
301
|
+
/**
|
|
302
|
+
* MIME Type for YAML files.
|
|
303
|
+
* Example: Configuration files for web applications are stored as `.yaml` or `.yml`.
|
|
304
|
+
*/
|
|
305
|
+
YAML: "application/x-yaml";
|
|
306
|
+
/**
|
|
307
|
+
* MIME Type for GraphQL query payloads.
|
|
308
|
+
* Example: GraphQL APIs handle `.graphql` files for client-server communication.
|
|
309
|
+
*/
|
|
310
|
+
GRAPHQL: "application/graphql";
|
|
311
|
+
/**
|
|
312
|
+
* MIME Type for URL-encoded form data.
|
|
313
|
+
* Example: Web forms send data as URL-encoded strings.
|
|
314
|
+
*/
|
|
315
|
+
URL_ENCODED: "application/x-www-form-urlencoded";
|
|
316
|
+
/**
|
|
317
|
+
* MIME Type for JSON data.
|
|
318
|
+
* Example: REST APIs send data responses as JSON objects.
|
|
319
|
+
*/
|
|
320
|
+
JSON: "application/json";
|
|
321
|
+
/**
|
|
322
|
+
* MIME Type for XML data.
|
|
323
|
+
* Example: SOAP APIs exchange data using `.xml` payloads.
|
|
324
|
+
*/
|
|
325
|
+
XML: "application/xml";
|
|
326
|
+
/**
|
|
327
|
+
* MIME Type for JavaScript files.
|
|
328
|
+
* Example: A server delivers a `.js` file requested by a web browser.
|
|
329
|
+
*/
|
|
330
|
+
JS: "application/javascript";
|
|
331
|
+
/**
|
|
332
|
+
* MIME Type for CSS files.
|
|
333
|
+
* Example: A server serves `.css` files to style a web page.
|
|
334
|
+
*/
|
|
335
|
+
CSS: "text/css";
|
|
336
|
+
/**
|
|
337
|
+
* MIME Type for HTML files.
|
|
338
|
+
* Example: A server sends an `.html` file as a response to a browser request.
|
|
339
|
+
*/
|
|
340
|
+
HTML: "text/html";
|
|
341
|
+
/** Font MIME Types */
|
|
342
|
+
/**
|
|
343
|
+
* MIME Type for Web Open Font Format (WOFF) files.
|
|
344
|
+
* Example: Websites load custom fonts using `.woff` files.
|
|
345
|
+
*/
|
|
346
|
+
WOFF: "font/woff";
|
|
347
|
+
/**
|
|
348
|
+
* MIME Type for Web Open Font Format 2 (WOFF2) files.
|
|
349
|
+
* Example: Modern websites use `.woff2` files for optimized font delivery.
|
|
350
|
+
*/
|
|
351
|
+
WOFF2: "font/woff2";
|
|
352
|
+
/**
|
|
353
|
+
* MIME Type for TrueType font files.
|
|
354
|
+
* Example: Fonts are shared in `.ttf` format for compatibility across systems.
|
|
355
|
+
*/
|
|
356
|
+
TTF: "font/ttf";
|
|
357
|
+
/**
|
|
358
|
+
* MIME Type for OpenType font files.
|
|
359
|
+
* Example: Fonts are shared in `.otf` format for enhanced capabilities.
|
|
360
|
+
*/
|
|
361
|
+
OTF: "font/otf";
|
|
362
|
+
}>;
|
|
363
|
+
/**
|
|
364
|
+
* Type definition for available MIME types.
|
|
365
|
+
*/
|
|
366
|
+
export type MimeType = keyof typeof mimeTypesLite;
|
|
367
|
+
export {};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Defines the various MIME types used in the application.
|
|
3
|
+
* This module exports an object that contains the different MIME types
|
|
4
|
+
* the application can handle. These MIME types are used to identify the format of data being processed or served.
|
|
5
|
+
*
|
|
6
|
+
* @module constants/mimeTypesLite
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
* @license CC BY-NC-ND 4.0
|
|
9
|
+
*
|
|
10
|
+
* @contact Mohammad Montasim -Al- Mamun Shuvo
|
|
11
|
+
* @created 2025-01-28
|
|
12
|
+
* @contactEmail montasimmamun@gmail.com
|
|
13
|
+
* @contactGithub https://github.com/montasim
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* An object representing different MIME types.
|
|
17
|
+
* @enum {string}
|
|
18
|
+
*/
|
|
19
|
+
const mimeTypesLite = Object.freeze({
|
|
20
|
+
/** Document MIME Types */
|
|
21
|
+
/**
|
|
22
|
+
* MIME Type for ePub files.
|
|
23
|
+
* Example: Digital books are distributed in `.epub` format for eReaders.
|
|
24
|
+
*/
|
|
25
|
+
EPUB: 'application/epub+zip',
|
|
26
|
+
/**
|
|
27
|
+
* MIME Type for Latex files.
|
|
28
|
+
* Example: Documents written in LaTeX are saved in `.tex` format.
|
|
29
|
+
*/
|
|
30
|
+
TEX: 'application/x-tex',
|
|
31
|
+
/**
|
|
32
|
+
* MIME Type for Microsoft PowerPoint files (`.ppt` files).
|
|
33
|
+
* Example: Presentations are shared in `.ppt` format.
|
|
34
|
+
*/
|
|
35
|
+
PPT: 'application/vnd.ms-powerpoint',
|
|
36
|
+
/**
|
|
37
|
+
* MIME Type for Microsoft PowerPoint files in the Office Open XML format (`.pptx` files).
|
|
38
|
+
* Example: Presentations are shared in `.pptx` format.
|
|
39
|
+
*/
|
|
40
|
+
PPTX: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
41
|
+
/**
|
|
42
|
+
* MIME Type for OpenDocument Text files.
|
|
43
|
+
* Example: Documents created in LibreOffice Writer are saved as `.odt` files.
|
|
44
|
+
*/
|
|
45
|
+
ODT: 'application/vnd.oasis.opendocument.text',
|
|
46
|
+
/**
|
|
47
|
+
* MIME Type for OpenDocument Spreadsheet files.
|
|
48
|
+
* Example: Spreadsheets created in LibreOffice Calc are saved as `.ods` files.
|
|
49
|
+
*/
|
|
50
|
+
ODS: 'application/vnd.oasis.opendocument.spreadsheet',
|
|
51
|
+
/**
|
|
52
|
+
* MIME Type for Rich Text Format (RTF) files.
|
|
53
|
+
* Example: Word processors can save documents as `.rtf` files for compatibility.
|
|
54
|
+
*/
|
|
55
|
+
RTF: 'application/rtf',
|
|
56
|
+
/**
|
|
57
|
+
* MIME Type for Microsoft Word documents (`.doc` files).
|
|
58
|
+
* Example: A server serves `.doc` files for download.
|
|
59
|
+
*/
|
|
60
|
+
DOC: 'application/msword',
|
|
61
|
+
/**
|
|
62
|
+
* MIME Type for Microsoft Word documents in the Office Open XML format (`.docx` files).
|
|
63
|
+
* Example: Exported reports are generated as `.docx` files.
|
|
64
|
+
*/
|
|
65
|
+
DOCX: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
66
|
+
/**
|
|
67
|
+
* MIME Type for Microsoft Excel files (`.xls` files).
|
|
68
|
+
* Example: Financial data is provided in `.xls` format.
|
|
69
|
+
*/
|
|
70
|
+
XLS: 'application/vnd.ms-excel',
|
|
71
|
+
/**
|
|
72
|
+
* MIME Type for Microsoft Excel spreadsheets in the Office Open XML format (`.xlsx` files).
|
|
73
|
+
* Example: Data analytics tools export `.xlsx` files.
|
|
74
|
+
*/
|
|
75
|
+
XLSX: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
76
|
+
/**
|
|
77
|
+
* MIME Type for PDF files.
|
|
78
|
+
* Example: The application generates an invoice as a `.pdf` file for download.
|
|
79
|
+
*/
|
|
80
|
+
PDF: 'application/pdf',
|
|
81
|
+
/**
|
|
82
|
+
* MIME Type for Markdown files.
|
|
83
|
+
* Example: Documentation files are stored and processed as `.md`.
|
|
84
|
+
*/
|
|
85
|
+
MD: 'text/markdown',
|
|
86
|
+
/**
|
|
87
|
+
* MIME Type for Plain Text files.
|
|
88
|
+
* Example: A log file is served as a `.txt` file.
|
|
89
|
+
*/
|
|
90
|
+
TXT: 'text/plain',
|
|
91
|
+
/**
|
|
92
|
+
* MIME Type for CSV files.
|
|
93
|
+
* Example: Exported reports are downloaded as `.csv` files.
|
|
94
|
+
*/
|
|
95
|
+
CSV: 'text/csv',
|
|
96
|
+
/** Image MIME Types */
|
|
97
|
+
/**
|
|
98
|
+
* MIME Type for XCF files.
|
|
99
|
+
* Example: Images edited in GIMP are saved in `.xcf` format.
|
|
100
|
+
*/
|
|
101
|
+
XCF: 'image/x-xcf',
|
|
102
|
+
/**
|
|
103
|
+
* MIME Type for Photoshop files.
|
|
104
|
+
* Example: Graphics are saved and edited in `.psd` format.
|
|
105
|
+
*/
|
|
106
|
+
PSD: 'image/vnd.adobe.photoshop',
|
|
107
|
+
/**
|
|
108
|
+
* MIME Type for JPEG 2000 images.
|
|
109
|
+
* Example: High-quality images saved in `.jp2` format.
|
|
110
|
+
*/
|
|
111
|
+
JP2: 'image/jp2',
|
|
112
|
+
/**
|
|
113
|
+
* MIME Type for AVIF images.
|
|
114
|
+
* Example: Modern compressed images saved in `.avif` format.
|
|
115
|
+
*/
|
|
116
|
+
AVIF: 'image/avif',
|
|
117
|
+
/**
|
|
118
|
+
* MIME Type for HEIC images.
|
|
119
|
+
* Example: Photos captured by modern smartphones are saved as `.heic` files for better compression.
|
|
120
|
+
*/
|
|
121
|
+
HEIC: 'image/heic',
|
|
122
|
+
/**
|
|
123
|
+
* MIME Type for WebP images.
|
|
124
|
+
* Example: Web servers deliver `.webp` images for optimized website performance.
|
|
125
|
+
*/
|
|
126
|
+
WEBP: 'image/webp',
|
|
127
|
+
/**
|
|
128
|
+
* MIME Type for JPEG images.
|
|
129
|
+
* Example: User profile pictures are uploaded and served as `.jpeg` images.
|
|
130
|
+
*/
|
|
131
|
+
JPG: 'image/jpeg',
|
|
132
|
+
/**
|
|
133
|
+
* MIME Type for JPEG images.
|
|
134
|
+
* Example: User profile pictures are uploaded and served as `.jpeg` images.
|
|
135
|
+
*/
|
|
136
|
+
JPEG: 'image/jpeg',
|
|
137
|
+
/**
|
|
138
|
+
* MIME Type for PNG images.
|
|
139
|
+
* Example: A server serves `.png` files for website logos.
|
|
140
|
+
*/
|
|
141
|
+
PNG: 'image/png',
|
|
142
|
+
/**
|
|
143
|
+
* MIME Type for ICO images.
|
|
144
|
+
* Example: A server provides a `.ico` file as the favicon for a website.
|
|
145
|
+
*/
|
|
146
|
+
ICO: 'image/x-icon',
|
|
147
|
+
/**
|
|
148
|
+
* MIME Type for GIF images.
|
|
149
|
+
* Example: A messaging app serves `.gif` files for animated stickers.
|
|
150
|
+
*/
|
|
151
|
+
GIF: 'image/gif',
|
|
152
|
+
/**
|
|
153
|
+
* MIME Type for BMP images.
|
|
154
|
+
* Example: Specialized imaging software processes `.bmp` files.
|
|
155
|
+
*/
|
|
156
|
+
BMP: 'image/bmp',
|
|
157
|
+
/**
|
|
158
|
+
* MIME Type for TIFF images.
|
|
159
|
+
* Example: High-quality scanned documents are stored as `.tiff` files.
|
|
160
|
+
*/
|
|
161
|
+
TIFF: 'image/tiff',
|
|
162
|
+
/**
|
|
163
|
+
* MIME Type for SVG images.
|
|
164
|
+
* Example: A website serves `.svg` files for scalable vector icons.
|
|
165
|
+
*/
|
|
166
|
+
SVG: 'image/svg+xml',
|
|
167
|
+
/** Video MIME Types */
|
|
168
|
+
/**
|
|
169
|
+
* MIME Type for MKV videos.
|
|
170
|
+
* Example: High-quality video files saved in `.mkv` format.
|
|
171
|
+
*/
|
|
172
|
+
MKV: 'video/x-matroska',
|
|
173
|
+
/**
|
|
174
|
+
* MIME Type for FLV videos.
|
|
175
|
+
* Example: Flash video files are distributed in `.flv` format.
|
|
176
|
+
*/
|
|
177
|
+
FLV: 'video/x-flv',
|
|
178
|
+
/**
|
|
179
|
+
* MIME Type for WMV videos.
|
|
180
|
+
* Example: Windows Media videos are saved as `.wmv` files.
|
|
181
|
+
*/
|
|
182
|
+
WMV: 'video/x-ms-wmv',
|
|
183
|
+
/**
|
|
184
|
+
* MIME Type for QuickTime videos.
|
|
185
|
+
* Example: Apple devices record videos in `.mov` format using QuickTime.
|
|
186
|
+
*/
|
|
187
|
+
MOV: 'video/quicktime',
|
|
188
|
+
/**
|
|
189
|
+
* MIME Type for WebM videos.
|
|
190
|
+
* Example: Video sharing platforms provide `.webm` files for high-quality playback with smaller file sizes.
|
|
191
|
+
*/
|
|
192
|
+
WEBM: 'video/webm',
|
|
193
|
+
/**
|
|
194
|
+
* MIME Type for AVI videos.
|
|
195
|
+
* Example: Desktop applications render `.avi` files for video editing.
|
|
196
|
+
*/
|
|
197
|
+
AVI: 'video/avi',
|
|
198
|
+
/**
|
|
199
|
+
* MIME Type for MPEG videos.
|
|
200
|
+
* Example: Media players support playback of `.mpeg` files.
|
|
201
|
+
*/
|
|
202
|
+
MPEG: 'video/mpeg',
|
|
203
|
+
/**
|
|
204
|
+
* MIME Type for MP4 videos.
|
|
205
|
+
* Example: Video streaming services serve `.mp4` files for playback.
|
|
206
|
+
*/
|
|
207
|
+
MP4: 'video/mp4',
|
|
208
|
+
/** Audio MIME Types */
|
|
209
|
+
/**
|
|
210
|
+
* MIME Type for AMR audio files.
|
|
211
|
+
* Example: Voice recordings are stored in `.amr` format.
|
|
212
|
+
*/
|
|
213
|
+
AMR: 'audio/amr',
|
|
214
|
+
/**
|
|
215
|
+
* MIME Type for MIDI audio files.
|
|
216
|
+
* Example: Musical instrument digital interface data saved as `.midi` files.
|
|
217
|
+
*/
|
|
218
|
+
MIDI: 'audio/midi',
|
|
219
|
+
/**
|
|
220
|
+
* MIME Type for FLAC audio files.
|
|
221
|
+
* Example: Music enthusiasts use `.flac` files for lossless audio playback.
|
|
222
|
+
*/
|
|
223
|
+
FLAC: 'audio/flac',
|
|
224
|
+
/**
|
|
225
|
+
* MIME Type for OGG audio files.
|
|
226
|
+
* Example: Streaming platforms deliver `.ogg` files for high-quality audio playback.
|
|
227
|
+
*/
|
|
228
|
+
OGG: 'audio/ogg',
|
|
229
|
+
/**
|
|
230
|
+
* MIME Type for AAC audio files.
|
|
231
|
+
* Example: Advanced compression audio files are streamed as `.aac`.
|
|
232
|
+
*/
|
|
233
|
+
AAC: 'audio/aac',
|
|
234
|
+
/**
|
|
235
|
+
* MIME Type for MP3 audio files.
|
|
236
|
+
* Example: Music streaming services provide `.mp3` files for playback.
|
|
237
|
+
*/
|
|
238
|
+
MP3: 'audio/mpeg',
|
|
239
|
+
/**
|
|
240
|
+
* MIME Type for WAV audio files.
|
|
241
|
+
* Example: A sound editing application processes `.wav` files.
|
|
242
|
+
*/
|
|
243
|
+
WAV: 'audio/wav',
|
|
244
|
+
/** Archive MIME Types */
|
|
245
|
+
/**
|
|
246
|
+
* MIME Type for TAR archives.
|
|
247
|
+
* Example: Files are compressed in `.tar` format for packaging.
|
|
248
|
+
*/
|
|
249
|
+
TAR: 'application/x-tar',
|
|
250
|
+
/**
|
|
251
|
+
* MIME Type for GZ archives.
|
|
252
|
+
* Example: Files are compressed with GZIP and saved as `.gz` files.
|
|
253
|
+
*/
|
|
254
|
+
GZ: 'application/gzip',
|
|
255
|
+
/**
|
|
256
|
+
* MIME Type for 7z compressed archives.
|
|
257
|
+
* Example: Compressed files are shared in `.7z` format.
|
|
258
|
+
*/
|
|
259
|
+
SEVEN_ZIP: 'application/x-7z-compressed',
|
|
260
|
+
/**
|
|
261
|
+
* MIME Type for ZIP archives.
|
|
262
|
+
* Example: A server offers `.zip` archives for software downloads.
|
|
263
|
+
*/
|
|
264
|
+
ZIP: 'application/zip',
|
|
265
|
+
/**
|
|
266
|
+
* MIME Type for RAR archives.
|
|
267
|
+
* Example: Compressed files are provided in `.rar` format for download.
|
|
268
|
+
*/
|
|
269
|
+
RAR: 'application/vnd.rar',
|
|
270
|
+
/**
|
|
271
|
+
* MIME Type for BZ2 archives.
|
|
272
|
+
* Example: Files are compressed with BZIP2 and saved as `.bz2` files.
|
|
273
|
+
*/
|
|
274
|
+
BZ2: 'application/x-bzip2',
|
|
275
|
+
/** Web-related MIME Types */
|
|
276
|
+
/**
|
|
277
|
+
* MIME Type for `.ics` calendar files.
|
|
278
|
+
* Example: Calendar events are shared in `.ics` format for scheduling.
|
|
279
|
+
*/
|
|
280
|
+
ICS: 'text/calendar',
|
|
281
|
+
/**
|
|
282
|
+
* MIME Type for `.atom` feed files.
|
|
283
|
+
* Example: Websites syndicate content in `.atom` format for RSS readers.
|
|
284
|
+
*/
|
|
285
|
+
ATOM: 'application/atom+xml',
|
|
286
|
+
/**
|
|
287
|
+
* MIME Type for `.rss` feed files.
|
|
288
|
+
* Example: Websites syndicate content in `.rss` format for RSS readers.
|
|
289
|
+
*/
|
|
290
|
+
RSS: 'application/rss+xml',
|
|
291
|
+
/**
|
|
292
|
+
* MIME Type for `.wasm` WebAssembly files.
|
|
293
|
+
* Example: Servers deliver `.wasm` files to execute WebAssembly code in browsers.
|
|
294
|
+
*/
|
|
295
|
+
WASM: 'application/wasm',
|
|
296
|
+
/**
|
|
297
|
+
* MIME Type for `.csv` with semicolon separator.
|
|
298
|
+
* Example: Data files saved as `.csv` with a semicolon instead of a comma as a separator.
|
|
299
|
+
*/
|
|
300
|
+
CSV_SEMICOLON: 'text/csv+semicolon',
|
|
301
|
+
/**
|
|
302
|
+
* MIME Type for YAML files.
|
|
303
|
+
* Example: Configuration files for web applications are stored as `.yaml` or `.yml`.
|
|
304
|
+
*/
|
|
305
|
+
YAML: 'application/x-yaml',
|
|
306
|
+
/**
|
|
307
|
+
* MIME Type for GraphQL query payloads.
|
|
308
|
+
* Example: GraphQL APIs handle `.graphql` files for client-server communication.
|
|
309
|
+
*/
|
|
310
|
+
GRAPHQL: 'application/graphql',
|
|
311
|
+
/**
|
|
312
|
+
* MIME Type for URL-encoded form data.
|
|
313
|
+
* Example: Web forms send data as URL-encoded strings.
|
|
314
|
+
*/
|
|
315
|
+
URL_ENCODED: 'application/x-www-form-urlencoded',
|
|
316
|
+
/**
|
|
317
|
+
* MIME Type for JSON data.
|
|
318
|
+
* Example: REST APIs send data responses as JSON objects.
|
|
319
|
+
*/
|
|
320
|
+
JSON: 'application/json',
|
|
321
|
+
/**
|
|
322
|
+
* MIME Type for XML data.
|
|
323
|
+
* Example: SOAP APIs exchange data using `.xml` payloads.
|
|
324
|
+
*/
|
|
325
|
+
XML: 'application/xml',
|
|
326
|
+
/**
|
|
327
|
+
* MIME Type for JavaScript files.
|
|
328
|
+
* Example: A server delivers a `.js` file requested by a web browser.
|
|
329
|
+
*/
|
|
330
|
+
JS: 'application/javascript',
|
|
331
|
+
/**
|
|
332
|
+
* MIME Type for CSS files.
|
|
333
|
+
* Example: A server serves `.css` files to style a web page.
|
|
334
|
+
*/
|
|
335
|
+
CSS: 'text/css',
|
|
336
|
+
/**
|
|
337
|
+
* MIME Type for HTML files.
|
|
338
|
+
* Example: A server sends an `.html` file as a response to a browser request.
|
|
339
|
+
*/
|
|
340
|
+
HTML: 'text/html',
|
|
341
|
+
/** Font MIME Types */
|
|
342
|
+
/**
|
|
343
|
+
* MIME Type for Web Open Font Format (WOFF) files.
|
|
344
|
+
* Example: Websites load custom fonts using `.woff` files.
|
|
345
|
+
*/
|
|
346
|
+
WOFF: 'font/woff',
|
|
347
|
+
/**
|
|
348
|
+
* MIME Type for Web Open Font Format 2 (WOFF2) files.
|
|
349
|
+
* Example: Modern websites use `.woff2` files for optimized font delivery.
|
|
350
|
+
*/
|
|
351
|
+
WOFF2: 'font/woff2',
|
|
352
|
+
/**
|
|
353
|
+
* MIME Type for TrueType font files.
|
|
354
|
+
* Example: Fonts are shared in `.ttf` format for compatibility across systems.
|
|
355
|
+
*/
|
|
356
|
+
TTF: 'font/ttf',
|
|
357
|
+
/**
|
|
358
|
+
* MIME Type for OpenType font files.
|
|
359
|
+
* Example: Fonts are shared in `.otf` format for enhanced capabilities.
|
|
360
|
+
*/
|
|
361
|
+
OTF: 'font/otf',
|
|
362
|
+
});
|
|
363
|
+
module.exports = mimeTypesLite;
|
|
364
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,27 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mime-types-lite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A collection of common MIME types for use in applications.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "build/index.
|
|
6
|
+
"main": "./build/cjs/index.cjs",
|
|
7
|
+
"module": "./build/esm/index.js",
|
|
7
8
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
9
|
+
"node": ">=23.x",
|
|
9
10
|
"npm": ">=10.x"
|
|
10
11
|
},
|
|
11
12
|
"keywords": [
|
|
12
|
-
"MIME types",
|
|
13
13
|
"mime types",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"mime-types",
|
|
15
|
+
"mimetypes",
|
|
16
|
+
"MIME types",
|
|
17
|
+
"media types",
|
|
18
|
+
"media-type",
|
|
16
19
|
"file types",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"mime",
|
|
22
|
-
"
|
|
23
|
-
"mime
|
|
24
|
-
"
|
|
20
|
+
"file-format",
|
|
21
|
+
"mime type constants",
|
|
22
|
+
"mime type library",
|
|
23
|
+
"mime type utility",
|
|
24
|
+
"mime type definitions",
|
|
25
|
+
"mime type enum",
|
|
26
|
+
"mime type mapping",
|
|
27
|
+
"HTTP mime types",
|
|
28
|
+
"web development mime types",
|
|
29
|
+
"API mime types",
|
|
30
|
+
"file processing mime types",
|
|
31
|
+
"data serialization mime types",
|
|
32
|
+
"data interchange mime types",
|
|
33
|
+
"TypeScript mime types",
|
|
34
|
+
"Node.js mime types",
|
|
35
|
+
"JavaScript mime types",
|
|
36
|
+
"web application mime types",
|
|
37
|
+
"mime negotiation",
|
|
38
|
+
"accept header",
|
|
39
|
+
"mime-type header",
|
|
40
|
+
"file upload mime types",
|
|
41
|
+
"multipart form data",
|
|
42
|
+
"JSON mime type",
|
|
43
|
+
"XML mime type",
|
|
44
|
+
"HTML mime type",
|
|
45
|
+
"CSS mime type",
|
|
46
|
+
"image mime types",
|
|
47
|
+
"video mime types",
|
|
48
|
+
"audio mime types",
|
|
49
|
+
"text mime types",
|
|
50
|
+
"application mime types",
|
|
51
|
+
"common mime types",
|
|
52
|
+
"standard mime types",
|
|
53
|
+
"predefined mime types",
|
|
54
|
+
"immutable mime types",
|
|
55
|
+
"lightweight mime types",
|
|
56
|
+
"efficient mime types",
|
|
57
|
+
"cross-platform mime types",
|
|
58
|
+
"open source mime types",
|
|
59
|
+
"npm package",
|
|
60
|
+
"mime-types-lite",
|
|
61
|
+
"montasim"
|
|
25
62
|
],
|
|
26
63
|
"author": {
|
|
27
64
|
"name": "Mohammad Montasim -Al- Mamun Shuvo",
|