Socket
Socket
Sign inDemoInstall

mime-kind

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mime-kind - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

10

main.js

@@ -60,2 +60,3 @@ 'use strict';

if (data) {
let file = null;
if (isString(data)) {

@@ -67,9 +68,12 @@ const mime = mimeType.lookup(data);

if (isExists(data)) {
return fileType(chunkSync({ path: data, flags: 'r' }));
file = fileType(chunkSync({ path: data, flags: 'r' }));
}
} else if (Buffer.isBuffer(data)) {
return fileType(data);
file = fileType(data);
} else if (isStream(data)) {
return fileType(streamSync(data));
file = fileType(streamSync(data));
}
if (file != null) {
return file;
}
}

@@ -76,0 +80,0 @@

{
"name": "mime-kind",
"author": "Alexey Bystrov <strikeentco@gmail.com>",
"version": "2.0.1",
"version": "2.0.2",
"description": "Detect the mime type of a Buffer, ReadStream, file path and file name.",

@@ -38,15 +38,15 @@ "engines": {

"dependencies": {
"file-type": "^3.9.0",
"mime-types": "^2.1.12"
"file-type": "^4.3.0",
"mime-types": "^2.1.15"
},
"devDependencies": {
"eslint": "^3.8.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"mocha": "^3.1.2",
"should": "^11.1.1"
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-react": "^7.0.1",
"mocha": "^3.4.2",
"should": "^11.2.1"
},
"license": "MIT"
}

@@ -51,2 +51,2 @@ mime-kind [![License](https://img.shields.io/npm/l/mime-kind.svg)](https://github.com/strikeentco/mime-kind/blob/master/LICENSE) [![npm](https://img.shields.io/npm/v/mime-kind.svg)](https://www.npmjs.com/package/mime-kind)

The MIT License (MIT)<br/>
Copyright (c) 2015-2016 Alexey Bystrov
Copyright (c) 2015-2017 Alexey Bystrov

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc