file-type
Advanced tools
Comparing version 18.5.0 to 18.6.0
@@ -53,2 +53,3 @@ import type {Readable as ReadableStream} from 'node:stream'; | ||
| 'elf' | ||
| 'macho' | ||
| 'exe' | ||
@@ -213,2 +214,3 @@ | 'swf' | ||
| 'application/x-elf' | ||
| 'application/x-mach-binary' | ||
| 'application/x-msdownload' | ||
@@ -215,0 +217,0 @@ | 'application/x-shockwave-flash' |
@@ -697,3 +697,3 @@ import {Buffer} from 'node:buffer'; | ||
// https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska | ||
// https://github.com/file/file/blob/master/magic/Magdir/matroska | ||
if (this.check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML | ||
@@ -859,2 +859,9 @@ async function readField() { | ||
if (this.check([0xCF, 0xFA, 0xED, 0xFE])) { | ||
return { | ||
ext: 'macho', | ||
mime: 'application/x-mach-binary', | ||
}; | ||
} | ||
// -- 5-byte signatures -- | ||
@@ -861,0 +868,0 @@ |
{ | ||
"name": "file-type", | ||
"version": "18.5.0", | ||
"version": "18.6.0", | ||
"description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer", | ||
@@ -55,2 +55,3 @@ "license": "MIT", | ||
"elf", | ||
"macho", | ||
"exe", | ||
@@ -57,0 +58,0 @@ "binary", |
@@ -391,2 +391,3 @@ # file-type | ||
- [`m4v`](https://en.wikipedia.org/wiki/M4V) - Video container format developed by Apple, which is very similar to the MP4 format | ||
- [`macho`](https://en.wikipedia.org/wiki/Mach-O) - Mach-O binary format | ||
- [`mid`](https://en.wikipedia.org/wiki/MIDI) - Musical Instrument Digital Interface file | ||
@@ -393,0 +394,0 @@ - [`mie`](https://en.wikipedia.org/wiki/Sidecar_file) - Dedicated meta information format which supports storage of binary as well as textual meta information |
@@ -51,2 +51,3 @@ export const extensions = [ | ||
'elf', | ||
'macho', | ||
'exe', | ||
@@ -210,2 +211,3 @@ 'swf', | ||
'application/x-elf', | ||
'application/x-mach-binary', | ||
'application/x-msdownload', | ||
@@ -212,0 +214,0 @@ 'application/x-shockwave-flash', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84839
2220
486