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

@filerobot/utils

Package Overview
Dependencies
Maintainers
1
Versions
1360
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@filerobot/utils - npm Package Compare versions

Comparing version 0.0.0-beta.61 to 0.0.0-beta.62

18

lib/getFileType.js

@@ -8,8 +8,2 @@ import getFileNameAndExtension from './getFileNameAndExtension';

var type = file.mime || file.type || ((_file$data = file.data) === null || _file$data === void 0 ? void 0 : _file$data.type) || ((_file$meta = file.meta) === null || _file$meta === void 0 ? void 0 : _file$meta.img_type);
if (type) {
return type;
}
var fileExtension = file.name ? getFileNameAndExtension(file.name).extension : null;

@@ -21,6 +15,12 @@ fileExtension = fileExtension ? fileExtension.toLowerCase() : null;

return mimeTypes[fileExtension];
} else {
// if all fails, fall back to a generic byte stream type
return 'application/octet-stream';
}
var type = file.mime || file.type || ((_file$data = file.data) === null || _file$data === void 0 ? void 0 : _file$data.type) || ((_file$meta = file.meta) === null || _file$meta === void 0 ? void 0 : _file$meta.img_type);
if (type) {
return type;
} // if all fails, fall back to a generic byte stream type
return 'application/octet-stream';
}

@@ -6,3 +6,3 @@ {

"types": "types/index.d.ts",
"version": "0.0.0-beta.61",
"version": "0.0.0-beta.62",
"files": [

@@ -15,3 +15,3 @@ "/dist",

"dependencies": {
"@filerobot/icons": "0.0.0-beta.61",
"@filerobot/icons": "0.0.0-beta.62",
"abortcontroller-polyfill": "^1.4.0",

@@ -18,0 +18,0 @@ "lodash.throttle": "^4.1.1"

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