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

drag-drop

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drag-drop - npm Package Compare versions

Comparing version 7.1.0 to 7.2.0

24

index.js

@@ -159,3 +159,11 @@ /*! drag-drop. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

if (listeners.onDrop && event.dataTransfer.items) {
processItems(event.dataTransfer.items, (files, directories) => {
processItems(event.dataTransfer.items, (err, files, directories) => {
if (err) {
// TODO: A future version of this library might expose this somehow
console.error(err)
return
}
if (files.length === 0) return
const fileList = event.dataTransfer.files

@@ -187,3 +195,5 @@

if (items.length === 0) return
if (items.length === 0) {
cb(null, [], [])
}

@@ -195,5 +205,7 @@ parallel(items.map(item => {

}), (err, results) => {
// This catches permission errors with file:// in Chrome. This should never
// throw in production code, so the user does not need to use try-catch.
if (err) throw err
// This catches permission errors with file:// in Chrome
if (err) {
cb(err)
return
}

@@ -210,3 +222,3 @@ const entries = results.flat(Infinity)

cb(files, directories)
cb(null, files, directories)
})

@@ -213,0 +225,0 @@ }

{
"name": "drag-drop",
"description": "HTML5 drag & drop for humans",
"version": "7.1.0",
"version": "7.2.0",
"author": {

@@ -22,3 +22,3 @@ "name": "Feross Aboukhadijeh",

"standard": "*",
"tape": "^5.2.0"
"tape": "^5.2.2"
},

@@ -25,0 +25,0 @@ "homepage": "https://github.com/feross/drag-drop",

@@ -193,3 +193,3 @@ # drag-drop [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

document.addEventListener('paste', event => {
dragDrop.processItems(event.clipboardData.items, files => {
dragDrop.processItems(event.clipboardData.items, (err, files) => {
// ...

@@ -196,0 +196,0 @@ })

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