Socket
Socket
Sign inDemoInstall

file-type

Package Overview
Dependencies
11
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 18.5.0 to 18.6.0

2

core.d.ts

@@ -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 @@

3

package.json
{
"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',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc