file-type 18.4.0 → 18.5.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 +2 -0
- package/core.js +7 -0
- package/package.json +3 -2
- package/readme.md +1 -0
- package/supported.js +2 -0
package/core.d.ts
CHANGED
|
@@ -151,6 +151,7 @@ export type FileExtension =
|
|
|
151
151
|
| 'cpio'
|
|
152
152
|
| 'ace'
|
|
153
153
|
| 'avro'
|
|
154
|
+
| 'icc'
|
|
154
155
|
; // eslint-disable-line semi-style
|
|
155
156
|
|
|
156
157
|
export type MimeType =
|
|
@@ -298,6 +299,7 @@ export type MimeType =
|
|
|
298
299
|
| 'application/x-cpio'
|
|
299
300
|
| 'application/x-ace-compressed'
|
|
300
301
|
| 'application/avro'
|
|
302
|
+
| 'application/vnd.iccprofile'
|
|
301
303
|
; // eslint-disable-line semi-style
|
|
302
304
|
|
|
303
305
|
export type FileTypeResult = {
|
package/core.js
CHANGED
|
@@ -1311,6 +1311,13 @@ class FileTypeParser {
|
|
|
1311
1311
|
// Increase sample size from 12 to 256.
|
|
1312
1312
|
await tokenizer.peekBuffer(this.buffer, {length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true});
|
|
1313
1313
|
|
|
1314
|
+
if (this.check([0x61, 0x63, 0x73, 0x70], {offset: 36})) {
|
|
1315
|
+
return {
|
|
1316
|
+
ext: 'icc',
|
|
1317
|
+
mime: 'application/vnd.iccprofile',
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1314
1321
|
// -- 15-byte signatures --
|
|
1315
1322
|
|
|
1316
1323
|
if (this.checkString('BEGIN:')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-type",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.5.0",
|
|
4
4
|
"description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/file-type",
|
|
@@ -203,7 +203,8 @@
|
|
|
203
203
|
"arj",
|
|
204
204
|
"cpio",
|
|
205
205
|
"ace",
|
|
206
|
-
"avro"
|
|
206
|
+
"avro",
|
|
207
|
+
"icc"
|
|
207
208
|
],
|
|
208
209
|
"dependencies": {
|
|
209
210
|
"readable-web-to-node-stream": "^3.0.2",
|
package/readme.md
CHANGED
|
@@ -366,6 +366,7 @@ Returns a `Set<string>` of supported MIME types.
|
|
|
366
366
|
- [`glb`](https://github.com/KhronosGroup/glTF) - GL Transmission Format
|
|
367
367
|
- [`gz`](https://en.wikipedia.org/wiki/Gzip) - Archive file
|
|
368
368
|
- [`heic`](https://nokiatech.github.io/heif/technical.html) - High Efficiency Image File Format
|
|
369
|
+
- [`icc`](https://en.wikipedia.org/wiki/ICC_profile) - ICC Profile
|
|
369
370
|
- [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) - Apple Icon image
|
|
370
371
|
- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file
|
|
371
372
|
- [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
|
package/supported.js
CHANGED
|
@@ -148,6 +148,7 @@ export const extensions = [
|
|
|
148
148
|
'cpio',
|
|
149
149
|
'ace',
|
|
150
150
|
'avro',
|
|
151
|
+
'icc',
|
|
151
152
|
];
|
|
152
153
|
|
|
153
154
|
export const mimeTypes = [
|
|
@@ -295,4 +296,5 @@ export const mimeTypes = [
|
|
|
295
296
|
'application/x-cpio',
|
|
296
297
|
'application/x-ace-compressed',
|
|
297
298
|
'application/avro',
|
|
299
|
+
'application/vnd.iccprofile',
|
|
298
300
|
];
|