file-type
Advanced tools
Comparing version 19.4.1 to 19.5.0
@@ -168,2 +168,3 @@ /** | ||
| 'vsdx' | ||
| 'vtt' | ||
; // eslint-disable-line semi-style | ||
@@ -274,2 +275,3 @@ | ||
| 'text/vcard' | ||
| 'text/vtt' | ||
| 'model/gltf-binary' | ||
@@ -276,0 +278,0 @@ | 'application/vnd.tcpdump.pcap' |
12
core.js
@@ -1142,2 +1142,14 @@ /** | ||
if ( | ||
this.checkString('WEBVTT') | ||
&& ( | ||
// One of LF, CR, tab, space, or end of file must follow "WEBVTT" per the spec (see `fixture/fixture-vtt-*.vtt` for examples). Note that `\0` is technically the null character (there is no such thing as an EOF character). However, checking for `\0` gives us the same result as checking for the end of the stream. | ||
(['\n', '\r', '\t', ' ', '\0'].some(char7 => this.checkString(char7, {offset: 6})))) | ||
) { | ||
return { | ||
ext: 'vtt', | ||
mime: 'text/vtt', | ||
}; | ||
} | ||
// -- 8-byte signatures -- | ||
@@ -1144,0 +1156,0 @@ |
{ | ||
"name": "file-type", | ||
"version": "19.4.1", | ||
"version": "19.5.0", | ||
"description": "Detect the file type of a file, stream, or data", | ||
@@ -218,3 +218,4 @@ "license": "MIT", | ||
"fbx", | ||
"vsdx" | ||
"vsdx", | ||
"vtt" | ||
], | ||
@@ -221,0 +222,0 @@ "dependencies": { |
@@ -510,2 +510,3 @@ <h1 align="center" title="file-type"> | ||
- [`vsdx`](https://en.wikipedia.org/wiki/Microsoft_Visio) - Microsoft Visio File | ||
- [`vtt`](https://en.wikipedia.org/wiki/WebVTT) - WebVTT File (for video captions) | ||
- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) - WebAssembly intermediate compiled format | ||
@@ -512,0 +513,0 @@ - [`wav`](https://en.wikipedia.org/wiki/WAV) - Waveform Audio file |
@@ -155,2 +155,3 @@ export const extensions = [ | ||
'vsdx', | ||
'vtt', | ||
]; | ||
@@ -261,2 +262,3 @@ | ||
'text/vcard', | ||
'text/vtt', | ||
'model/gltf-binary', | ||
@@ -263,0 +265,0 @@ 'application/vnd.tcpdump.pcap', |
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
99618
2424
561