file-type
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "file-type", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Detect the file type of a Buffer/Uint8Array", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -25,3 +25,3 @@ # file-type [![Build Status](https://travis-ci.org/sindresorhus/file-type.svg?branch=master)](https://travis-ci.org/sindresorhus/file-type) | ||
fileType(buffer); | ||
//=> png | ||
//=> {ext: 'png', mime: 'image/png'} | ||
``` | ||
@@ -40,3 +40,3 @@ | ||
console.log(fileType(chunk)); | ||
//=> gif | ||
//=> {ext: 'gif', mime: 'image/gif'} | ||
}); | ||
@@ -55,3 +55,3 @@ }); | ||
fileType(new Uint8Array(this.response)); | ||
//=> png | ||
//=> {ext: 'png', mime: 'image/png'} | ||
}; | ||
@@ -67,4 +67,7 @@ | ||
Returns one of the [supported file types](#supported-file-types) or `null`. | ||
Returns an object (or `null` when no match) with: | ||
- `ext` - one of the [supported file types](#supported-file-types) | ||
- `mime` - the [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) | ||
#### buffer | ||
@@ -71,0 +74,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9596
136
0