file-type 20.2.0 → 20.4.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.js CHANGED
@@ -917,6 +917,13 @@ export class FileTypeParser {
917
917
  };
918
918
  }
919
919
 
920
+ if (this.checkString('ttcf')) {
921
+ return {
922
+ ext: 'ttc',
923
+ mime: 'font/collection',
924
+ };
925
+ }
926
+
920
927
  if (this.check([0xCF, 0xFA, 0xED, 0xFE])) {
921
928
  return {
922
929
  ext: 'macho',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-type",
3
- "version": "20.2.0",
3
+ "version": "20.4.0",
4
4
  "description": "Detect the file type of a file, stream, or data",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/file-type",
@@ -15,16 +15,22 @@
15
15
  ".": {
16
16
  "node": {
17
17
  "types": "./index.d.ts",
18
- "import": "./index.js"
18
+ "import": "./index.js",
19
+ "module-sync": "./index.js"
19
20
  },
20
21
  "default": {
21
22
  "types": "./core.d.ts",
22
- "import": "./core.js"
23
+ "import": "./core.js",
24
+ "module-sync": "./core.js"
23
25
  }
24
26
  },
25
27
  "./core": {
26
28
  "types": "./core.d.ts",
27
- "import": "./core.js"
29
+ "default": "./core.js"
30
+ },
31
+ "./node": {
32
+ "types": "./index.d.ts",
33
+ "default": "./index.js"
28
34
  }
29
35
  },
30
36
  "sideEffects": false,
@@ -118,6 +124,7 @@
118
124
  "eot",
119
125
  "ttf",
120
126
  "otf",
127
+ "ttc",
121
128
  "ico",
122
129
  "flv",
123
130
  "ps",
package/readme.md CHANGED
@@ -578,6 +578,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream.
578
578
  - [`swf`](https://en.wikipedia.org/wiki/SWF) - Adobe Flash Player file
579
579
  - [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) - Tarball archive file
580
580
  - [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) - Tagged Image file
581
+ - [`ttc`](https://en.wikipedia.org/wiki/TrueType#TrueType_Collection) - TrueType Collection font
581
582
  - [`ttf`](https://en.wikipedia.org/wiki/TrueType) - TrueType font
582
583
  - [`vcf`](https://en.wikipedia.org/wiki/VCard) - vCard
583
584
  - [`voc`](https://wiki.multimedia.cx/index.php/Creative_Voice) - Creative Voice File
package/supported.js CHANGED
@@ -58,6 +58,7 @@ export const extensions = [
58
58
  'eot',
59
59
  'ttf',
60
60
  'otf',
61
+ 'ttc',
61
62
  'ico',
62
63
  'flv',
63
64
  'ps',
@@ -239,6 +240,7 @@ export const mimeTypes = [
239
240
  'application/vnd.ms-fontobject',
240
241
  'font/ttf',
241
242
  'font/otf',
243
+ 'font/collection',
242
244
  'image/x-icon',
243
245
  'video/x-flv',
244
246
  'application/postscript',