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.2.0 to 2.2.1

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(a,u){if(!t[a]){if(!e[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[a]={exports:{}};e[a][0].call(s.exports,function(n){var t=e[a][1][n];return o(t?t:n)},s,s.exports,n,e,t,r)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(n,e,t){function r(){if(!u){u=!0;for(var n,e=a.length;e;){n=a,a=[];for(var t=-1;++t<e;)n[t]();e=a.length}u=!1}}function o(){}var i=e.exports={},a=[],u=!1;i.nextTick=function(n){a.push(n),u||setTimeout(r,0)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=o,i.addListener=o,i.once=o,i.off=o,i.removeListener=o,i.removeAllListeners=o,i.emit=o,i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.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 n.concat(Array.isArray(o)&&e>r?t(o,r+1):o)},[])}return e="number"==typeof e?e:1/0,t(n,1)}},{}],3:[function(n,e,t){function r(n,e,t){var r=!0,f=!0;if("function"!=typeof n)throw new TypeError(a);return t===!1?r=!1:o(t)&&(r="leading"in t?!!t.leading:r,f="trailing"in t?!!t.trailing:f),u.leading=r,u.maxWait=+e,u.trailing=f,i(n,e,u)}function o(n){var e=typeof n;return"function"==e||!!n&&"object"==e}var i=n("lodash.debounce"),a="Expected a function",u={leading:!1,maxWait:0,trailing:!1};e.exports=r},{"lodash.debounce":4}],4:[function(n,e,t){function r(n,e,t){function r(){g&&clearTimeout(g),p&&clearTimeout(p),p=g=y=void 0}function i(){var t=e-(c()-v);if(0>=t||t>e){p&&clearTimeout(p);var r=y;p=g=y=void 0,r&&(h=c(),d=n.apply(m,l),g||p||(l=m=null))}else g=setTimeout(i,t)}function f(){g&&clearTimeout(g),p=g=y=void 0,(w||x!==e)&&(h=c(),d=n.apply(m,l),g||p||(l=m=null))}function s(){if(l=arguments,v=c(),m=this,y=w&&(g||!T),x===!1)var t=T&&!g;else{p||T||(h=v);var r=x-(v-h),o=0>=r||r>x;o?(p&&(p=clearTimeout(p)),h=v,d=n.apply(m,l)):p||(p=setTimeout(f,r))}return o&&g?g=clearTimeout(g):g||e===x||(g=setTimeout(i,e)),t&&(o=!0,d=n.apply(m,l)),!o||g||p||(l=m=null),d}var l,p,d,v,m,g,y,h=0,x=!1,w=!0;if("function"!=typeof n)throw new TypeError(a);if(e=0>e?0:+e||0,t===!0){var T=!0;w=!1}else o(t)&&(T=t.leading,x="maxWait"in t&&u(+t.maxWait||0,e),w="trailing"in t?t.trailing:w);return s.cancel=r,s}function o(n){var e=typeof n;return"function"==e||!!n&&"object"==e}var i=n("lodash.isnative"),a="Expected a function",u=Math.max,f=i(f=Date.now)&&f,c=f||function(){return(new Date).getTime()};e.exports=r},{"lodash.isnative":5}],5:[function(n,e,t){function r(n){return"string"==typeof n?n:null==n?"":n+""}function o(n){return!!n&&"object"==typeof n}function i(n){return null==n?!1:d.call(n)==u?v.test(p.call(n)):o(n)&&f.test(n)}function a(n){return n=r(n),n&&s.test(n)?n.replace(c,"\\$&"):n}var u="[object Function]",f=/^\[object .+?Constructor\]$/,c=/[.*+?^${}()|[\]\/\\]/g,s=RegExp(c.source),l=Object.prototype,p=Function.prototype.toString,d=l.toString,v=RegExp("^"+a(d).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i},{}],6:[function(n,e,t){var r=n("dezalgo");e.exports=function(n,e){function t(n,t,r){o[n]=r,(0===--i||t)&&(e&&e(t,o),e=null)}e&&(e=r(e));var o,i,a;Array.isArray(n)?(o=[],i=n.length):(a=Object.keys(n),o={},i=a.length),i?a?a.forEach(function(e){n[e](t.bind(void 0,e))}):n.forEach(function(n,e){n(t.bind(void 0,e))}):(e&&e(null,o),e=null)}},{dezalgo:7}],7:[function(n,e,t){function r(n){var e=!0;return i(function(){e=!1}),function(){var t=arguments,r=this;e?i(function(){n.apply(r,t)}):n.apply(r,t)}}var o=n("wrappy");e.exports=o(r);var i=n("asap")},{asap:8,wrappy:9}],8:[function(n,e,t){(function(n){function t(){for(;o.next;){o=o.next;var n=o.task;o.task=void 0;var e=o.domain;e&&(o.domain=void 0,e.enter());try{n()}catch(r){if(f)throw e&&e.exit(),setTimeout(t,0),e&&e.enter(),r;setTimeout(function(){throw r},0)}e&&e.exit()}a=!1}function r(e){i=i.next={task:e,domain:f&&n.domain,next:null},a||(a=!0,u())}var o={task:void 0,next:null},i=o,a=!1,u=void 0,f=!1;if("undefined"!=typeof n&&n.nextTick)f=!0,u=function(){n.nextTick(t)};else if("function"==typeof setImmediate)u="undefined"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=t,u=function(){c.port2.postMessage(0)}}else u=function(){setTimeout(t,0)};e.exports=r}).call(this,n("_process"))},{_process:1}],9:[function(n,e,t){function r(n,e){function t(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];var r=n.apply(this,e),o=e[e.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach(function(n){r[n]=o[n]}),r}if(n&&e)return r(n)(e);if("function"!=typeof n)throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(e){t[e]=n[e]}),t}e.exports=r},{}],"/":[function(n,e,t){function r(n,e){"string"==typeof n&&(n=document.querySelector(n));var t=i(n),r=a(n,e);return n.addEventListener("dragenter",o,!1),n.addEventListener("dragover",t,!1),n.addEventListener("drop",r,!1),function(){n.classList.remove("drag"),n.removeEventListener("dragenter",o,!1),n.removeEventListener("dragover",t,!1),n.removeEventListener("drop",r,!1)}}function o(n){return n.stopPropagation(),n.preventDefault(),!1}function i(n){var e=l(function(){n.classList.add("drag"),n.timeout&&clearTimeout(n.timeout),n.timeout=setTimeout(function(){n.classList.remove("drag")},150)},100,{trailing:!1});return function(n){n.stopPropagation(),n.preventDefault(),n.dataTransfer.dropEffect="copy",e()}}function a(n,e){return function(t){return t.stopPropagation(),t.preventDefault(),n.classList.remove("drag"),t.dataTransfer.items?s(f(t.dataTransfer.items).map(function(n){return function(e){u(n.webkitGetAsEntry(),e)}}),function(n,t){n||e(c(t))}):e(f(t.dataTransfer.files),{x:t.clientX,y:t.clientY}),!1}}function u(n,e){function t(){i.readEntries(function(n){n.length>0?(o=o.concat(f(n)),t()):r()})}function r(){s(o.map(function(n){return function(e){u(n,e)}}),e)}var o=[];if(n.isFile)n.file(function(n){e(null,n)});else if(n.isDirectory){var i=n.createReader();t()}}function f(n){return Array.prototype.slice.call(n||[],0)}e.exports=r;var c=n("flatten"),s=n("run-parallel"),l=n("lodash.throttle")},{flatten:2,"lodash.throttle":3,"run-parallel":6}]},{},[])("/")});
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.DragDrop=n()}}(function(){return function n(t,e,r){function o(a,u){if(!e[a]){if(!t[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=e[a]={exports:{}};t[a][0].call(s.exports,function(n){var e=t[a][1][n];return o(e?e:n)},s,s.exports,n,t,e,r)}return e[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(n,t,e){function r(){s=!1,u.length?c=u.concat(c):l=-1,c.length&&o()}function o(){if(!s){var n=setTimeout(r);s=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u[l].run();l=-1,t=c.length}u=null,s=!1,clearTimeout(n)}}function i(n,t){this.fun=n,this.array=t}function a(){}var u,f=t.exports={},c=[],s=!1,l=-1;f.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];c.push(new i(n,t)),1!==c.length||s||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=a,f.addListener=a,f.once=a,f.off=a,f.removeListener=a,f.removeAllListeners=a,f.emit=a,f.binding=function(n){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(n){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],2:[function(n,t,e){t.exports=function(n,t){function e(n,r){return n.reduce(function(n,o){return Array.isArray(o)&&t>r?n.concat(e(o,r+1)):n.concat(o)},[])}return t="number"==typeof t?t:1/0,e(n,1)}},{}],3:[function(n,t,e){function r(n,t,e){var r=!0,f=!0;if("function"!=typeof n)throw new TypeError(a);return e===!1?r=!1:o(e)&&(r="leading"in e?!!e.leading:r,f="trailing"in e?!!e.trailing:f),u.leading=r,u.maxWait=+t,u.trailing=f,i(n,t,u)}function o(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}var i=n("lodash.debounce"),a="Expected a function",u={leading:!1,maxWait:0,trailing:!1};t.exports=r},{"lodash.debounce":4}],4:[function(n,t,e){function r(n,t,e){function r(){m&&clearTimeout(m),p&&clearTimeout(p),p=m=y=void 0}function i(){var e=t-(c()-v);if(0>=e||e>t){p&&clearTimeout(p);var r=y;p=m=y=void 0,r&&(h=c(),d=n.apply(g,l),m||p||(l=g=null))}else m=setTimeout(i,e)}function f(){m&&clearTimeout(m),p=m=y=void 0,(x||w!==t)&&(h=c(),d=n.apply(g,l),m||p||(l=g=null))}function s(){if(l=arguments,v=c(),g=this,y=x&&(m||!T),w===!1)var e=T&&!m;else{p||T||(h=v);var r=w-(v-h),o=0>=r||r>w;o?(p&&(p=clearTimeout(p)),h=v,d=n.apply(g,l)):p||(p=setTimeout(f,r))}return o&&m?m=clearTimeout(m):m||t===w||(m=setTimeout(i,t)),e&&(o=!0,d=n.apply(g,l)),!o||m||p||(l=g=null),d}var l,p,d,v,g,m,y,h=0,w=!1,x=!0;if("function"!=typeof n)throw new TypeError(a);if(t=0>t?0:+t||0,e===!0){var T=!0;x=!1}else o(e)&&(T=e.leading,w="maxWait"in e&&u(+e.maxWait||0,t),x="trailing"in e?e.trailing:x);return s.cancel=r,s}function o(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}var i=n("lodash._getnative"),a="Expected a function",u=Math.max,f=i(Date,"now"),c=f||function(){return(new Date).getTime()};t.exports=r},{"lodash._getnative":5}],5:[function(n,t,e){function r(n){return"string"==typeof n?n:null==n?"":n+""}function o(n){return!!n&&"object"==typeof n}function i(n,t){var e=null==n?void 0:n[t];return a(e)?e:void 0}function a(n){return null==n?!1:g.call(n)==f?m.test(d.call(n)):o(n)&&l.test(n)}function u(n){return n=r(n),n&&s.test(n)?n.replace(c,"\\$&"):n}var f="[object Function]",c=/[.*+?^${}()|[\]\/\\]/g,s=RegExp(c.source),l=/^\[object .+?Constructor\]$/,p=Object.prototype,d=Function.prototype.toString,v=p.hasOwnProperty,g=p.toString,m=RegExp("^"+u(d.call(v)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=i},{}],6:[function(n,t,e){var r=n("dezalgo");t.exports=function(n,t){function e(n,e,r){o[n]=r,(0===--i||e)&&(t&&t(e,o),t=null)}t&&(t=r(t));var o,i,a;Array.isArray(n)?(o=[],i=n.length):(a=Object.keys(n),o={},i=a.length),i?a?a.forEach(function(t){n[t](e.bind(void 0,t))}):n.forEach(function(n,t){n(e.bind(void 0,t))}):(t&&t(null,o),t=null)}},{dezalgo:7}],7:[function(n,t,e){function r(n){var t=!0;return i(function(){t=!1}),function(){var e=arguments,r=this;t?i(function(){n.apply(r,e)}):n.apply(r,e)}}var o=n("wrappy");t.exports=o(r);var i=n("asap")},{asap:8,wrappy:9}],8:[function(n,t,e){(function(n){function e(){for(;o.next;){o=o.next;var n=o.task;o.task=void 0;var t=o.domain;t&&(o.domain=void 0,t.enter());try{n()}catch(r){if(f)throw t&&t.exit(),setTimeout(e,0),t&&t.enter(),r;setTimeout(function(){throw r},0)}t&&t.exit()}a=!1}function r(t){i=i.next={task:t,domain:f&&n.domain,next:null},a||(a=!0,u())}var o={task:void 0,next:null},i=o,a=!1,u=void 0,f=!1;if("undefined"!=typeof n&&n.nextTick)f=!0,u=function(){n.nextTick(e)};else if("function"==typeof setImmediate)u="undefined"!=typeof window?setImmediate.bind(window,e):function(){setImmediate(e)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=e,u=function(){c.port2.postMessage(0)}}else u=function(){setTimeout(e,0)};t.exports=r}).call(this,n("_process"))},{_process:1}],9:[function(n,t,e){function r(n,t){function e(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];var r=n.apply(this,t),o=t[t.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach(function(n){r[n]=o[n]}),r}if(n&&t)return r(n)(t);if("function"!=typeof n)throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(t){e[t]=n[t]}),e}t.exports=r},{}],"/":[function(n,t,e){function r(n,t){"string"==typeof n&&(n=document.querySelector(n));var e=i(n),r=a(n,t);return n.addEventListener("dragenter",o,!1),n.addEventListener("dragover",e,!1),n.addEventListener("drop",r,!1),function(){n.classList.remove("drag"),n.removeEventListener("dragenter",o,!1),n.removeEventListener("dragover",e,!1),n.removeEventListener("drop",r,!1)}}function o(n){return n.stopPropagation(),n.preventDefault(),!1}function i(n){var t=l(function(){n.classList.add("drag"),n.timeout&&clearTimeout(n.timeout),n.timeout=setTimeout(function(){n.classList.remove("drag")},150)},100,{trailing:!1});return function(n){n.stopPropagation(),n.preventDefault(),n.dataTransfer.dropEffect="copy",t()}}function a(n,t){return function(e){return e.stopPropagation(),e.preventDefault(),n.classList.remove("drag"),e.dataTransfer.items?s(f(e.dataTransfer.items).map(function(n){return function(t){u(n.webkitGetAsEntry(),t)}}),function(n,e){n||t(c(e))}):t(f(e.dataTransfer.files),{x:e.clientX,y:e.clientY}),!1}}function u(n,t){function e(){i.readEntries(function(n){n.length>0?(o=o.concat(f(n)),e()):r()})}function r(){s(o.map(function(n){return function(t){u(n,t)}}),t)}var o=[];if(n.isFile)n.file(function(n){t(null,n)});else if(n.isDirectory){var i=n.createReader();e()}}function f(n){return Array.prototype.slice.call(n||[],0)}t.exports=r;var c=n("flatten"),s=n("run-parallel"),l=n("lodash.throttle")},{flatten:2,"lodash.throttle":3,"run-parallel":6}]},{},[])("/")});
{
"name": "drag-drop",
"description": "HTML5 drag & drop for humans",
"version": "2.2.0",
"version": "2.2.1",
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)",

@@ -16,3 +16,3 @@ "bugs": {

"devDependencies": {
"browserify": "^9.0.3",
"browserify": "^10.2.1",
"standard": "^3.7.1",

@@ -19,0 +19,0 @@ "tape": "^4.0.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