All Versions
42
Latest Version
Avg Release Cycle
13 days
Latest Release
1059 days ago
Changelog History
Page 3
Changelog History
Page 3
-
v13.1.1 Changes
January 19, 2020 -
v13.1.0 Changes
January 15, 2020 -
v13.0.3 Changes
January 09, 2020- โช Restore Node.js 8 compatibility 09eec7b
-
v13.0.2 Changes
January 07, 2020 -
v13.0.1 Changes
January 07, 2020 -
v13.0.0 Changes
January 07, 2020๐ฅ Breaking
- Require Node.js 10 0b97a85
Rewrite the API and make it async (#286) 8f981c3
- Why: To be non-blocking, to be able to accept a stream as input, and improved file type detection.
- Migrate:
-const fileType = require('file-type');+const FileType = require('file-type');-console.log(fileType(buffer));+console.log(await FileType.fromBuffer(buffer));
๐ Browser supports was moved into a sub-module:
- Migrate:
-const fileType = require('file-type');+const fileType = require('file-type/browser');
โจ Enhancements
- โ Add
.fromFile()
method to detect the file type of a file (#286) 8f981c3 - โ Add
.fromStream()
method to detect the file type of a stream (#286) 8f981c3
โก๏ธ If you have access to the file, this method is recommended over.fromBuffer()
, as it can better optimize the detection speed. - โ Add
.fromBlob()
convenience method when used in the browser (#286) 8f981c3 - โ Add support for
CR3
(#292) 204599a - Stop execution after
FileType.stream()
error (#273) 3840e6a
-
v12.4.2 Changes
December 20, 2019 -
v12.4.1 Changes
December 19, 2019 -
v12.4.0 Changes
October 31, 2019 -
v12.3.1 Changes
October 22, 2019