Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-type

Package Overview
Dependencies
Maintainers
2
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-type - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc