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

react-use-file-upload

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-use-file-upload - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

9

dist/lib/useFileUpload.js

@@ -45,2 +45,3 @@ "use strict";

const filesArr = Array.from(files);
setFilesState(filesArr);
handleSizes(filesArr);

@@ -57,9 +58,9 @@ }

/** @function getFileNames */
const getFileNames = react_1.useCallback(() => {
const getFileNames = () => {
return files.map((file) => file.name);
}, [files]);
};
/** @function getFileTypes */
const getFileTypes = react_1.useCallback(() => {
const getFileTypes = () => {
return files.map((file) => file.type);
}, [files]);
};
/** @function removeFile */

@@ -66,0 +67,0 @@ const removeFile = react_1.useCallback((file) => {

{
"name": "react-use-file-upload",
"version": "0.3.1",
"version": "0.3.2",
"description": "A React Hook to make dealing with file uploading easier.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -47,2 +47,3 @@ import { useState, useCallback } from 'react';

const filesArr: File[] = Array.from(files);
setFilesState(filesArr);
handleSizes(filesArr);

@@ -61,10 +62,10 @@ }

/** @function getFileNames */
const getFileNames = useCallback((): string[] => {
const getFileNames = () => {
return files.map((file) => file.name);
}, [files]);
};
/** @function getFileTypes */
const getFileTypes = useCallback((): string[] => {
const getFileTypes = () => {
return files.map((file) => file.type);
}, [files]);
};

@@ -71,0 +72,0 @@ /** @function removeFile */

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