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

dnd-core

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnd-core - npm Package Compare versions

Comparing version 1.3.0 to 2.0.1

22

lib/HandlerRegistry.js

@@ -25,2 +25,6 @@ 'use strict';

var _asap = require('asap');
var _asap2 = _interopRequireDefault(_asap);
var HandlerRoles = {

@@ -159,13 +163,23 @@ SOURCE: 'SOURCE',

HandlerRegistry.prototype.removeSource = function removeSource(sourceId) {
var _this2 = this;
_invariant2['default'](this.getSource(sourceId), 'Expected an existing source.');
this.store.dispatch(_actionsRegistry.removeSource(sourceId));
delete this.handlers[sourceId];
delete this.types[sourceId];
_asap2['default'](function () {
delete _this2.handlers[sourceId];
delete _this2.types[sourceId];
});
};
HandlerRegistry.prototype.removeTarget = function removeTarget(targetId) {
var _this3 = this;
_invariant2['default'](this.getTarget(targetId), 'Expected an existing target.');
this.store.dispatch(_actionsRegistry.removeTarget(targetId));
delete this.handlers[targetId];
delete this.types[targetId];
_asap2['default'](function () {
delete _this3.handlers[targetId];
delete _this3.types[targetId];
});
};

@@ -172,0 +186,0 @@

3

package.json
{
"name": "dnd-core",
"version": "1.3.0",
"version": "2.0.1",
"description": "Drag and drop sans the GUI",

@@ -33,2 +33,3 @@ "main": "lib/index.js",

"dependencies": {
"asap": "^2.0.3",
"invariant": "^2.0.0",

@@ -35,0 +36,0 @@ "lodash": "^4.2.0",

@@ -5,2 +5,3 @@ import invariant from 'invariant';

import { addSource, addTarget, removeSource, removeTarget } from './actions/registry';
import asap from 'asap';

@@ -139,4 +140,7 @@ const HandlerRoles = {

this.store.dispatch(removeSource(sourceId));
delete this.handlers[sourceId];
delete this.types[sourceId];
asap(() => {
delete this.handlers[sourceId];
delete this.types[sourceId];
});
}

@@ -147,4 +151,7 @@

this.store.dispatch(removeTarget(targetId));
delete this.handlers[targetId];
delete this.types[targetId];
asap(() => {
delete this.handlers[targetId];
delete this.types[targetId];
});
}

@@ -151,0 +158,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