file-type 16.0.1 → 16.1.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 CHANGED
@@ -135,7 +135,8 @@ declare namespace core {
135
135
  | 'lzh'
136
136
  | 'pgp'
137
137
  | 'asar'
138
- | 'stl';
138
+ | 'stl'
139
+ | 'chm';
139
140
 
140
141
  type MimeType =
141
142
  | 'image/jpeg'
@@ -264,7 +265,8 @@ declare namespace core {
264
265
  | 'application/x-lzh-compressed'
265
266
  | 'application/pgp-encrypted'
266
267
  | 'application/x-asar'
267
- | 'model/stl';
268
+ | 'model/stl'
269
+ | 'application/vnd.ms-htmlhelp';
268
270
 
269
271
  interface FileTypeResult {
270
272
  /**
package/core.js CHANGED
@@ -880,6 +880,13 @@ async function _fromTokenizer(tokenizer) {
880
880
  }
881
881
  }
882
882
 
883
+ if (checkString('ITSF')) {
884
+ return {
885
+ ext: 'chm',
886
+ mime: 'application/vnd.ms-htmlhelp'
887
+ };
888
+ }
889
+
883
890
  // -- 6-byte signatures --
884
891
 
885
892
  if (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-type",
3
- "version": "16.0.1",
3
+ "version": "16.1.0",
4
4
  "description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/file-type",
@@ -179,7 +179,8 @@
179
179
  "lzh",
180
180
  "pgp",
181
181
  "asar",
182
- "stl"
182
+ "stl",
183
+ "chm"
183
184
  ],
184
185
  "devDependencies": {
185
186
  "@types/node": "^13.1.4",
package/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # file-type [![Build Status](https://travis-ci.com/sindresorhus/file-type.svg?branch=master)](https://travis-ci.com/github/sindresorhus/file-type)
1
+ # file-type
2
2
 
3
3
  > Detect the file type of a Buffer/Uint8Array/ArrayBuffer
4
4
 
@@ -404,13 +404,14 @@ Returns a set of supported MIME types.
404
404
  - [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy
405
405
  - [`asar`](https://github.com/electron/asar#format) - Archive format primarily used to enclose Electron applications
406
406
  - [`stl`](https://en.wikipedia.org/wiki/STL_(file_format)) - Standard Tesselated Geometry File Format (ASCII only)
407
+ - [`chm`](https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help) - Microsoft Compiled HTML Help
407
408
 
408
409
  *Pull requests are welcome for additional commonly used file types.*
409
410
 
410
411
  The following file types will not be accepted:
411
412
  - [MS-CFB: Microsoft Compound File Binary File Format based formats](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b), too old and difficult to parse:
412
- - `.doc` - Microsoft Word 97-2003 Document
413
- - `.xls` - Microsoft Excel 97-2003 Document
413
+ - `.doc` - Microsoft Word 97-2003 Document
414
+ - `.xls` - Microsoft Excel 97-2003 Document
414
415
  - `.ppt` - Microsoft PowerPoint97-2003 Document
415
416
  - `.msi` - Microsoft Windows Installer
416
417
  - `.csv` - [Reason.](https://github.com/sindresorhus/file-type/issues/264#issuecomment-568439196)
package/supported.js CHANGED
@@ -133,7 +133,8 @@ module.exports = {
133
133
  'lzh',
134
134
  'pgp',
135
135
  'asar',
136
- 'stl'
136
+ 'stl',
137
+ 'chm'
137
138
  ],
138
139
  mimeTypes: [
139
140
  'image/jpeg',
@@ -262,6 +263,7 @@ module.exports = {
262
263
  'application/x-lzh-compressed',
263
264
  'application/pgp-encrypted',
264
265
  'application/x-asar',
265
- 'model/stl'
266
+ 'model/stl',
267
+ 'application/vnd.ms-htmlhelp'
266
268
  ]
267
269
  };