file-type 16.2.0 → 16.3.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/core.d.ts +4 -3
- package/core.js +7 -0
- package/package.json +3 -2
- package/readme.md +77 -76
- package/supported.js +4 -2
package/core.d.ts
CHANGED
|
@@ -137,7 +137,8 @@ declare namespace core {
|
|
|
137
137
|
| 'asar'
|
|
138
138
|
| 'stl'
|
|
139
139
|
| 'chm'
|
|
140
|
-
| '3mf'
|
|
140
|
+
| '3mf'
|
|
141
|
+
| 'zst';
|
|
141
142
|
|
|
142
143
|
type MimeType =
|
|
143
144
|
| 'image/jpeg'
|
|
@@ -268,7 +269,8 @@ declare namespace core {
|
|
|
268
269
|
| 'application/x-asar'
|
|
269
270
|
| 'model/stl'
|
|
270
271
|
| 'application/vnd.ms-htmlhelp'
|
|
271
|
-
| 'model/3mf'
|
|
272
|
+
| 'model/3mf'
|
|
273
|
+
| 'application/zstd';
|
|
272
274
|
|
|
273
275
|
interface FileTypeResult {
|
|
274
276
|
/**
|
|
@@ -376,4 +378,3 @@ declare namespace core {
|
|
|
376
378
|
}
|
|
377
379
|
|
|
378
380
|
export = core;
|
|
379
|
-
|
package/core.js
CHANGED
|
@@ -805,6 +805,13 @@ async function _fromTokenizer(tokenizer) {
|
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
if (check([0x28, 0xB5, 0x2F, 0xFD])) {
|
|
809
|
+
return {
|
|
810
|
+
ext: 'zst',
|
|
811
|
+
mime: 'application/zstd'
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
|
|
808
815
|
// -- 5-byte signatures --
|
|
809
816
|
|
|
810
817
|
if (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-type",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.0",
|
|
4
4
|
"description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/file-type",
|
|
@@ -181,7 +181,8 @@
|
|
|
181
181
|
"asar",
|
|
182
182
|
"stl",
|
|
183
183
|
"chm",
|
|
184
|
-
"3mf"
|
|
184
|
+
"3mf",
|
|
185
|
+
"zst"
|
|
185
186
|
],
|
|
186
187
|
"devDependencies": {
|
|
187
188
|
"@types/node": "^13.1.4",
|
package/readme.md
CHANGED
|
@@ -272,12 +272,12 @@ Returns a set of supported MIME types.
|
|
|
272
272
|
|
|
273
273
|
## Supported file types
|
|
274
274
|
|
|
275
|
-
- [`jpg`](https://en.wikipedia.org/wiki/JPEG)
|
|
276
|
-
- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics)
|
|
275
|
+
- [`jpg`](https://en.wikipedia.org/wiki/JPEG) - Joint Photographic Experts Group image
|
|
276
|
+
- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) - Portable Network Graphics
|
|
277
277
|
- [`apng`](https://en.wikipedia.org/wiki/APNG) - Animated Portable Network Graphics
|
|
278
|
-
- [`gif`](https://en.wikipedia.org/wiki/GIF)
|
|
279
|
-
- [`webp`](https://en.wikipedia.org/wiki/WebP)
|
|
280
|
-
- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format)
|
|
278
|
+
- [`gif`](https://en.wikipedia.org/wiki/GIF) - Graphics Interchange Format
|
|
279
|
+
- [`webp`](https://en.wikipedia.org/wiki/WebP) - Web Picture format
|
|
280
|
+
- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format
|
|
281
281
|
- [`cr2`](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2)
|
|
282
282
|
- [`cr3`](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3)
|
|
283
283
|
- [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file
|
|
@@ -286,86 +286,87 @@ Returns a set of supported MIME types.
|
|
|
286
286
|
- [`nef`](https://www.nikonusa.com/en/learn-and-explore/a/products-and-innovation/nikon-electronic-format-nef.html) - Nikon Electronic Format image file
|
|
287
287
|
- [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file
|
|
288
288
|
- [`raf`](https://en.wikipedia.org/wiki/Raw_image_format) - Fujifilm RAW image file
|
|
289
|
-
- [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format)
|
|
290
|
-
- [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format)
|
|
291
|
-
- [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format)
|
|
292
|
-
- [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR)
|
|
293
|
-
- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format)
|
|
294
|
-
- [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format)
|
|
295
|
-
- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format))
|
|
296
|
-
- [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format)
|
|
297
|
-
- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format))
|
|
298
|
-
- [`gz`](https://en.wikipedia.org/wiki/Gzip)
|
|
299
|
-
- [`bz2`](https://en.wikipedia.org/wiki/Bzip2)
|
|
300
|
-
- [`
|
|
301
|
-
- [`
|
|
302
|
-
- [`
|
|
303
|
-
- [`
|
|
304
|
-
- [`
|
|
305
|
-
- [`
|
|
306
|
-
- [`
|
|
307
|
-
- [`
|
|
308
|
-
- [`
|
|
289
|
+
- [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) - Tagged Image file
|
|
290
|
+
- [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format) - Bitmap image file
|
|
291
|
+
- [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) - Apple Icon image
|
|
292
|
+
- [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR) - Joint Photographic Experts Group extended range
|
|
293
|
+
- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) - Adobe Photoshop document
|
|
294
|
+
- [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format) - Adobe InDesign document
|
|
295
|
+
- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) - Archive file
|
|
296
|
+
- [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) - Tarball archive file
|
|
297
|
+
- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) - Archive file
|
|
298
|
+
- [`gz`](https://en.wikipedia.org/wiki/Gzip) - Archive file
|
|
299
|
+
- [`bz2`](https://en.wikipedia.org/wiki/Bzip2) - Archive file
|
|
300
|
+
- [`zst`](https://en.wikipedia.org/wiki/Zstandard) - Archive file
|
|
301
|
+
- [`7z`](https://en.wikipedia.org/wiki/7z) - 7-Zip archive
|
|
302
|
+
- [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) - Apple Disk Image
|
|
303
|
+
- [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 Part 14 video file
|
|
304
|
+
- [`mid`](https://en.wikipedia.org/wiki/MIDI) - Musical Instrument Digital Interface file
|
|
305
|
+
- [`mkv`](https://en.wikipedia.org/wiki/Matroska) - Matroska video file
|
|
306
|
+
- [`webm`](https://en.wikipedia.org/wiki/WebM) - Web video file
|
|
307
|
+
- [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format) - QuickTime video file
|
|
308
|
+
- [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) - Audio Video Interleave file
|
|
309
|
+
- [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) - MPEG-1 file
|
|
309
310
|
- [`mp1`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_I) - MPEG-1 Audio Layer I
|
|
310
|
-
- [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II)
|
|
311
|
-
- [`mp3`](https://en.wikipedia.org/wiki/MP3)
|
|
312
|
-
- [`ogg`](https://en.wikipedia.org/wiki/Ogg)
|
|
313
|
-
- [`ogv`](https://en.wikipedia.org/wiki/Ogg)
|
|
314
|
-
- [`ogm`](https://en.wikipedia.org/wiki/Ogg)
|
|
315
|
-
- [`oga`](https://en.wikipedia.org/wiki/Ogg)
|
|
316
|
-
- [`spx`](https://en.wikipedia.org/wiki/Ogg)
|
|
317
|
-
- [`ogx`](https://en.wikipedia.org/wiki/Ogg)
|
|
318
|
-
- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format))
|
|
319
|
-
- [`flac`](https://en.wikipedia.org/wiki/FLAC)
|
|
320
|
-
- [`wav`](https://en.wikipedia.org/wiki/WAV)
|
|
321
|
-
- [`qcp`](https://en.wikipedia.org/wiki/QCP)
|
|
322
|
-
- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec)
|
|
323
|
-
- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format)
|
|
324
|
-
- [`epub`](https://en.wikipedia.org/wiki/EPUB)
|
|
311
|
+
- [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II) - MPEG-1 Audio Layer II
|
|
312
|
+
- [`mp3`](https://en.wikipedia.org/wiki/MP3) - Audio file
|
|
313
|
+
- [`ogg`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
314
|
+
- [`ogv`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
315
|
+
- [`ogm`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
316
|
+
- [`oga`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
317
|
+
- [`spx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
318
|
+
- [`ogx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
319
|
+
- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) - Audio file
|
|
320
|
+
- [`flac`](https://en.wikipedia.org/wiki/FLAC) - Free Lossless Audio Codec
|
|
321
|
+
- [`wav`](https://en.wikipedia.org/wiki/WAV) - Waveform Audio file
|
|
322
|
+
- [`qcp`](https://en.wikipedia.org/wiki/QCP) - Tagged and chunked data
|
|
323
|
+
- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) - Adaptive Multi-Rate audio codec
|
|
324
|
+
- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format
|
|
325
|
+
- [`epub`](https://en.wikipedia.org/wiki/EPUB) - E-book file
|
|
325
326
|
- [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket
|
|
326
|
-
- [`exe`](https://en.wikipedia.org/wiki/.exe)
|
|
327
|
-
- [`swf`](https://en.wikipedia.org/wiki/SWF)
|
|
328
|
-
- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format)
|
|
329
|
-
- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format)
|
|
330
|
-
- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format)
|
|
331
|
-
- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType)
|
|
332
|
-
- [`ttf`](https://en.wikipedia.org/wiki/TrueType)
|
|
333
|
-
- [`otf`](https://en.wikipedia.org/wiki/OpenType)
|
|
334
|
-
- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format))
|
|
335
|
-
- [`flv`](https://en.wikipedia.org/wiki/Flash_Video)
|
|
336
|
-
- [`ps`](https://en.wikipedia.org/wiki/Postscript)
|
|
337
|
-
- [`xz`](https://en.wikipedia.org/wiki/Xz)
|
|
338
|
-
- [`sqlite`](https://www.sqlite.org/fileformat2.html)
|
|
339
|
-
- [`nes`](https://fileinfo.com/extension/nes)
|
|
340
|
-
- [`crx`](https://developer.chrome.com/extensions/crx)
|
|
341
|
-
- [`xpi`](https://en.wikipedia.org/wiki/XPInstall)
|
|
342
|
-
- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format))
|
|
343
|
-
- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format))
|
|
344
|
-
- [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix))
|
|
345
|
-
- [`rpm`](https://fileinfo.com/extension/rpm)
|
|
346
|
-
- [`Z`](https://fileinfo.com/extension/z)
|
|
347
|
-
- [`lz`](https://en.wikipedia.org/wiki/Lzip)
|
|
348
|
-
- [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format)
|
|
349
|
-
- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format)
|
|
350
|
-
- [`mts`](https://en.wikipedia.org/wiki/.m2ts)
|
|
351
|
-
- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly)
|
|
352
|
-
- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format)
|
|
353
|
-
- [`bpg`](https://bellard.org/bpg/)
|
|
354
|
-
- [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML)
|
|
355
|
-
- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML)
|
|
356
|
-
- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML)
|
|
327
|
+
- [`exe`](https://en.wikipedia.org/wiki/.exe) - Executable file
|
|
328
|
+
- [`swf`](https://en.wikipedia.org/wiki/SWF) - Adobe Flash Player file
|
|
329
|
+
- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format
|
|
330
|
+
- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
|
|
331
|
+
- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
|
|
332
|
+
- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) - Embedded OpenType font
|
|
333
|
+
- [`ttf`](https://en.wikipedia.org/wiki/TrueType) - TrueType font
|
|
334
|
+
- [`otf`](https://en.wikipedia.org/wiki/OpenType) - OpenType font
|
|
335
|
+
- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file
|
|
336
|
+
- [`flv`](https://en.wikipedia.org/wiki/Flash_Video) - Flash video
|
|
337
|
+
- [`ps`](https://en.wikipedia.org/wiki/Postscript) - Postscript
|
|
338
|
+
- [`xz`](https://en.wikipedia.org/wiki/Xz) - Compressed file
|
|
339
|
+
- [`sqlite`](https://www.sqlite.org/fileformat2.html) - SQLite file
|
|
340
|
+
- [`nes`](https://fileinfo.com/extension/nes) - Nintendo NES ROM
|
|
341
|
+
- [`crx`](https://developer.chrome.com/extensions/crx) - Google Chrome extension
|
|
342
|
+
- [`xpi`](https://en.wikipedia.org/wiki/XPInstall) - XPInstall file
|
|
343
|
+
- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) - Cabinet file
|
|
344
|
+
- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) - Debian package
|
|
345
|
+
- [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix)) - Archive file
|
|
346
|
+
- [`rpm`](https://fileinfo.com/extension/rpm) - Red Hat Package Manager file
|
|
347
|
+
- [`Z`](https://fileinfo.com/extension/z) - Unix Compressed File
|
|
348
|
+
- [`lz`](https://en.wikipedia.org/wiki/Lzip) - Arhive file
|
|
349
|
+
- [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format) - Compount File Binary Format
|
|
350
|
+
- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) - Material Exchange Format
|
|
351
|
+
- [`mts`](https://en.wikipedia.org/wiki/.m2ts) - Blu-ray Disc Audio-Video MPEG-2 Transport Stream
|
|
352
|
+
- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) - WebAssembly intermediate compiled format
|
|
353
|
+
- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) - Blender project
|
|
354
|
+
- [`bpg`](https://bellard.org/bpg/) - Better Portable Graphics file
|
|
355
|
+
- [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Word
|
|
356
|
+
- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Powerpoint
|
|
357
|
+
- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Excel
|
|
357
358
|
- [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
358
359
|
- [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
359
360
|
- [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
360
361
|
- [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000
|
|
361
|
-
- [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format)
|
|
362
|
+
- [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format) - Audio Interchange file
|
|
362
363
|
- [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing
|
|
363
364
|
- [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets
|
|
364
365
|
- [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations
|
|
365
|
-
- [`xml`](https://en.wikipedia.org/wiki/XML)
|
|
366
|
-
- [`heic`](https://nokiatech.github.io/heif/technical.html)
|
|
367
|
-
- [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format))
|
|
368
|
-
- [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/)
|
|
366
|
+
- [`xml`](https://en.wikipedia.org/wiki/XML) - eXtensible Markup Language
|
|
367
|
+
- [`heic`](https://nokiatech.github.io/heif/technical.html) - High Efficiency Image File Format
|
|
368
|
+
- [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Icon file
|
|
369
|
+
- [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/) - OpenGL and OpenGL ES textures
|
|
369
370
|
- [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio
|
|
370
371
|
- [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack
|
|
371
372
|
- [`asf`](https://en.wikipedia.org/wiki/Advanced_Systems_Format) - Advanced Systems Format
|
package/supported.js
CHANGED
|
@@ -135,7 +135,8 @@ module.exports = {
|
|
|
135
135
|
'asar',
|
|
136
136
|
'stl',
|
|
137
137
|
'chm',
|
|
138
|
-
'3mf'
|
|
138
|
+
'3mf',
|
|
139
|
+
'zst'
|
|
139
140
|
],
|
|
140
141
|
mimeTypes: [
|
|
141
142
|
'image/jpeg',
|
|
@@ -266,6 +267,7 @@ module.exports = {
|
|
|
266
267
|
'application/x-asar',
|
|
267
268
|
'model/stl',
|
|
268
269
|
'application/vnd.ms-htmlhelp',
|
|
269
|
-
'model/3mf'
|
|
270
|
+
'model/3mf',
|
|
271
|
+
'application/zstd'
|
|
270
272
|
]
|
|
271
273
|
};
|