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

rc-upload

Package Overview
Dependencies
Maintainers
5
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-upload - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

16

es/attr-accept.js

@@ -1,5 +0,1 @@

function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
export default (function (file, acceptedFiles) {

@@ -19,3 +15,13 @@ if (file && acceptedFiles) {

if (validType.charAt(0) === '.') {
return endsWith(fileName.toLowerCase(), validType.toLowerCase());
var lowerFileName = fileName.toLowerCase();
var lowerType = validType.toLowerCase();
var affixList = [lowerType];
if (lowerType === '.jpg' || lowerType === '.jpeg') {
affixList = ['.jpg', 'jpeg'];
}
return affixList.some(function (affix) {
return lowerFileName.endsWith(affix);
});
}

@@ -22,0 +28,0 @@

@@ -8,6 +8,2 @@ "use strict";

function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
var _default = function _default(file, acceptedFiles) {

@@ -27,3 +23,13 @@ if (file && acceptedFiles) {

if (validType.charAt(0) === '.') {
return endsWith(fileName.toLowerCase(), validType.toLowerCase());
var lowerFileName = fileName.toLowerCase();
var lowerType = validType.toLowerCase();
var affixList = [lowerType];
if (lowerType === '.jpg' || lowerType === '.jpeg') {
affixList = ['.jpg', 'jpeg'];
}
return affixList.some(function (affix) {
return lowerFileName.endsWith(affix);
});
}

@@ -30,0 +36,0 @@

{
"name": "rc-upload",
"version": "4.2.0",
"version": "4.2.1",
"description": "upload ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

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