file-type
Advanced tools
Comparing version 14.2.0 to 14.3.0
@@ -133,3 +133,4 @@ /// <reference types="node"/> | ||
| 'skp' | ||
| 'avif'; | ||
| 'avif' | ||
| 'eps'; | ||
@@ -199,2 +200,3 @@ type MimeType = | ||
| 'application/postscript' | ||
| 'application/eps' | ||
| 'application/x-xz' | ||
@@ -201,0 +203,0 @@ | 'application/x-sqlite3' |
17
core.js
@@ -123,2 +123,12 @@ 'use strict'; | ||
if (check([0x25, 0x21])) { | ||
await tokenizer.peekBuffer(buffer, {length: 24, mayBeLess: true}); | ||
if (checkString('PS-Adobe-', {offset: 2}) && | ||
checkString(' EPSF-', {offset: 14})) { | ||
return { | ||
ext: 'eps', | ||
mime: 'application/eps' | ||
}; | ||
} | ||
return { | ||
@@ -772,2 +782,9 @@ ext: 'ps', | ||
if (check([0xC5, 0xD0, 0xD3, 0xC6])) { | ||
return { | ||
ext: 'eps', | ||
mime: 'application/eps' | ||
}; | ||
} | ||
// -- 5-byte signatures -- | ||
@@ -774,0 +791,0 @@ |
{ | ||
"name": "file-type", | ||
"version": "14.2.0", | ||
"version": "14.3.0", | ||
"description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer", | ||
@@ -176,3 +176,4 @@ "license": "MIT", | ||
"skp", | ||
"avif" | ||
"avif", | ||
"eps" | ||
], | ||
@@ -179,0 +180,0 @@ "devDependencies": { |
@@ -400,2 +400,3 @@ # file-type [![Build Status](https://travis-ci.com/sindresorhus/file-type.svg?branch=master)](https://travis-ci.ocomrg/sindresorhus/file-type) | ||
- [`avif`](https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) - AV1 Image File Format | ||
- [`eps`](https://en.wikipedia.org/wiki/Encapsulated_PostScript) - Encapsulated PostScript | ||
@@ -402,0 +403,0 @@ *Pull requests are welcome for additional commonly used file types.* |
@@ -131,3 +131,4 @@ 'use strict'; | ||
'skp', | ||
'avif' | ||
'avif', | ||
'eps' | ||
], | ||
@@ -198,2 +199,3 @@ mimeTypes: [ | ||
'application/postscript', | ||
'application/eps', | ||
'application/x-xz', | ||
@@ -200,0 +202,0 @@ 'application/x-sqlite3', |
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
70852
1935
427