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

drag-drop

Package Overview
Dependencies
Maintainers
1
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 2.4.3 to 2.5.0

2

dragdrop.bundle.js

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

!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.DragDrop=n()}}(function(){return function n(e,t,r){function o(u,f){if(!t[u]){if(!e[u]){var a="function"==typeof require&&require;if(!f&&a)return a(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[u]={exports:{}};e[u][0].call(s.exports,function(n){var t=e[u][1][n];return o(t?t:n)},s,s.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(){s=!1,f.length?c=f.concat(c):l=-1,c.length&&o()}function o(){if(!s){var n=setTimeout(r);s=!0;for(var e=c.length;e;){for(f=c,c=[];++l<e;)f&&f[l].run();l=-1,e=c.length}f=null,s=!1,clearTimeout(n)}}function i(n,e){this.fun=n,this.array=e}function u(){}var f,a=e.exports={},c=[],s=!1,l=-1;a.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];c.push(new i(n,e)),1!==c.length||s||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=u,a.addListener=u,a.once=u,a.off=u,a.removeListener=u,a.removeAllListeners=u,a.emit=u,a.binding=function(n){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(n){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],2:[function(n,e,t){e.exports=function(n,e){function t(n,r){return n.reduce(function(n,o){return Array.isArray(o)&&e>r?n.concat(t(o,r+1)):n.concat(o)},[])}return e="number"==typeof e?e:1/0,t(n,1)}},{}],3:[function(n,e,t){(function(n){e.exports=function(e,t){function r(e){function r(){t&&t(e,i),t=null}a?n.nextTick(r):r()}function o(n,e,t){i[n]=t,(0===--u||e)&&r(e)}var i,u,f,a=!0;Array.isArray(e)?(i=[],u=e.length):(f=Object.keys(e),i={},u=f.length),u?f?f.forEach(function(n){e[n](o.bind(void 0,n))}):e.forEach(function(n,e){n(o.bind(void 0,e))}):r(null),a=!1}}).call(this,n("_process"))},{_process:1}],"/":[function(n,e,t){function r(n,e){"string"==typeof n&&(n=window.document.querySelector(n));var t=i(n),r=u(n),a=f(n,e);return n.addEventListener("dragenter",o,!1),n.addEventListener("dragover",t,!1),n.addEventListener("dragleave",r,!1),n.addEventListener("drop",a,!1),function(){n instanceof window.Element&&n.classList.remove("drag"),n.removeEventListener("dragenter",o,!1),n.removeEventListener("dragover",t,!1),n.removeEventListener("dragleave",r,!1),n.removeEventListener("drop",a,!1)}}function o(n){return n.stopPropagation(),n.preventDefault(),!1}function i(n){return function(e){return e.stopPropagation(),e.preventDefault(),n instanceof window.Element&&n.classList.add("drag"),e.dataTransfer.dropEffect="copy",!1}}function u(n){return function(e){return e.target===n?(e.stopPropagation(),e.preventDefault(),n instanceof window.Element&&n.classList.remove("drag"),!1):void 0}}function f(n,e){return function(t){t.stopPropagation(),t.preventDefault(),n instanceof window.Element&&n.classList.remove("drag");var r={x:t.clientX,y:t.clientY};if(t.dataTransfer.items)l(c(t.dataTransfer.items).map(function(n){return function(e){a(n.webkitGetAsEntry(),e)}}),function(n,t){if(n)throw n;e(s(t),r)});else{var o=c(t.dataTransfer.files);o.forEach(function(n){n.fullPath="/"+n.name}),e(o,r)}return!1}}function a(n,e){function t(){i.readEntries(function(n){n.length>0?(o=o.concat(c(n)),t()):r()})}function r(){l(o.map(function(n){return function(e){a(n,e)}}),e)}var o=[];if(n.isFile)n.file(function(t){t.fullPath=n.fullPath,e(null,t)},function(n){e(n)});else if(n.isDirectory){var i=n.createReader();t()}}function c(n){return Array.prototype.slice.call(n||[],0)}e.exports=r;var s=n("flatten"),l=n("run-parallel")},{flatten:2,"run-parallel":3}]},{},[])("/")});
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.DragDrop=n()}}(function(){return function n(e,t,r){function o(u,f){if(!t[u]){if(!e[u]){var a="function"==typeof require&&require;if(!f&&a)return a(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[u]={exports:{}};e[u][0].call(s.exports,function(n){var t=e[u][1][n];return o(t?t:n)},s,s.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(){s=!1,f.length?c=f.concat(c):l=-1,c.length&&o()}function o(){if(!s){var n=setTimeout(r);s=!0;for(var e=c.length;e;){for(f=c,c=[];++l<e;)f&&f[l].run();l=-1,e=c.length}f=null,s=!1,clearTimeout(n)}}function i(n,e){this.fun=n,this.array=e}function u(){}var f,a=e.exports={},c=[],s=!1,l=-1;a.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];c.push(new i(n,e)),1!==c.length||s||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=u,a.addListener=u,a.once=u,a.off=u,a.removeListener=u,a.removeAllListeners=u,a.emit=u,a.binding=function(n){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(n){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],2:[function(n,e,t){e.exports=function(n,e){function t(n,r){return n.reduce(function(n,o){return Array.isArray(o)&&e>r?n.concat(t(o,r+1)):n.concat(o)},[])}return e="number"==typeof e?e:1/0,t(n,1)}},{}],3:[function(n,e,t){(function(n){e.exports=function(e,t){function r(e){function r(){t&&t(e,i),t=null}a?n.nextTick(r):r()}function o(n,e,t){i[n]=t,(0===--u||e)&&r(e)}var i,u,f,a=!0;Array.isArray(e)?(i=[],u=e.length):(f=Object.keys(e),i={},u=f.length),u?f?f.forEach(function(n){e[n](o.bind(void 0,n))}):e.forEach(function(n,e){n(o.bind(void 0,e))}):r(null),a=!1}}).call(this,n("_process"))},{_process:1}],"/":[function(n,e,t){function r(n,e){"string"==typeof n&&(n=window.document.querySelector(n));var t=i(n),r=u(n),a=f(n,e);return n.addEventListener("dragenter",o,!1),n.addEventListener("dragover",t,!1),n.addEventListener("dragleave",r,!1),n.addEventListener("drop",a,!1),function(){n instanceof window.Element&&n.classList.remove("drag"),n.removeEventListener("dragenter",o,!1),n.removeEventListener("dragover",t,!1),n.removeEventListener("dragleave",r,!1),n.removeEventListener("drop",a,!1)}}function o(n){return n.stopPropagation(),n.preventDefault(),!1}function i(n){return function(e){return e.stopPropagation(),e.preventDefault(),n instanceof window.Element&&n.classList.add("drag"),e.dataTransfer.dropEffect="copy",!1}}function u(n){return function(e){return e.target===n?(e.stopPropagation(),e.preventDefault(),n instanceof window.Element&&n.classList.remove("drag"),!1):void 0}}function f(n,e){return function(t){t.stopPropagation(),t.preventDefault(),n instanceof window.Element&&n.classList.remove("drag");var r={x:t.clientX,y:t.clientY};if(t.dataTransfer.items){var o=c(t.dataTransfer.items).filter(function(n){return"file"===n.kind});if(0===o.length)return;l(o.map(function(n){return function(e){a(n.webkitGetAsEntry(),e)}}),function(n,t){if(n)throw n;e(s(t),r)})}else{var i=c(t.dataTransfer.files);if(0===i.length)return;i.forEach(function(n){n.fullPath="/"+n.name}),e(i,r)}return!1}}function a(n,e){function t(){i.readEntries(function(n){n.length>0?(o=o.concat(c(n)),t()):r()})}function r(){l(o.map(function(n){return function(e){a(n,e)}}),e)}var o=[];if(n.isFile)n.file(function(t){t.fullPath=n.fullPath,e(null,t)},function(n){e(n)});else if(n.isDirectory){var i=n.createReader();t()}}function c(n){return Array.prototype.slice.call(n||[],0)}e.exports=r;var s=n("flatten"),l=n("run-parallel")},{flatten:2,"run-parallel":3}]},{},[])("/")});

@@ -62,3 +62,7 @@ module.exports = dragDrop

// Handle directories in Chrome using the proprietary FileSystem API
parallel(toArray(e.dataTransfer.items).map(function (item) {
var items = toArray(e.dataTransfer.items).filter(function (item) {
return item.kind === 'file'
})
if (items.length === 0) return
parallel(items.map(function (item) {
return function (cb) {

@@ -75,2 +79,3 @@ processEntry(item.webkitGetAsEntry(), cb)

var files = toArray(e.dataTransfer.files)
if (files.length === 0) return
files.forEach(function (file) {

@@ -77,0 +82,0 @@ file.fullPath = '/' + file.name

{
"name": "drag-drop",
"description": "HTML5 drag & drop for humans",
"version": "2.4.3",
"version": "2.5.0",
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)",

@@ -6,0 +6,0 @@ "bugs": {

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