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.0 to 0.3.1

2

dist/lib/types.d.ts

@@ -8,5 +8,5 @@ export declare type useFileUploadHook = {

getFileTypes: () => string[];
onFileDrag: (e: Event) => void;
handleFileDDEvent: (e: Event) => void;
removeFile: (file: number | string) => void;
setFiles: (files: FileList) => void;
};

@@ -25,5 +25,5 @@ "use strict";

/**
* @function onFileDrag
* @function handleFileDDEvent
*/
const onFileDrag = (e) => {
const handleFileDDEvent = (e) => {
e.stopPropagation();

@@ -92,3 +92,3 @@ e.preventDefault();

getFileTypes,
onFileDrag,
handleFileDDEvent,
removeFile,

@@ -95,0 +95,0 @@ setFiles,

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

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

@@ -21,3 +21,3 @@ import { renderHook, act } from '@testing-library/react-hooks';

expect(typeof result.current.getFileTypes).toBe('function');
expect(typeof result.current.onFileDrag).toBe('function');
expect(typeof result.current.handleFileDDEvent).toBe('function');
expect(typeof result.current.removeFile).toBe('function');

@@ -24,0 +24,0 @@ expect(typeof result.current.setFiles).toBe('function');

@@ -8,5 +8,5 @@ export type useFileUploadHook = {

getFileTypes: () => string[];
onFileDrag: (e: Event) => void;
handleFileDDEvent: (e: Event) => void;
removeFile: (file: number | string) => void;
setFiles: (files: FileList) => void;
};

@@ -26,5 +26,5 @@ import { useState, useCallback } from 'react';

/**
* @function onFileDrag
* @function handleFileDDEvent
*/
const onFileDrag = (e: Event) => {
const handleFileDDEvent = (e: Event) => {
e.stopPropagation();

@@ -102,3 +102,3 @@ e.preventDefault();

getFileTypes,
onFileDrag,
handleFileDDEvent,
removeFile,

@@ -105,0 +105,0 @@ setFiles,

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