New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

subscribe-ui-event

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

subscribe-ui-event - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

dist-es/lib/listen.js

@@ -7,4 +7,7 @@ /**

import assign from 'lodash/assign';
import { supportPassiveEvent } from '../globalVars';
import globalVars from '../globalVars';
const supportPassiveEvent = globalVars.supportPassiveEvent;
const defaultEventOption = {

@@ -11,0 +14,0 @@ capture: false,

@@ -6,4 +6,6 @@ /**

import { removers } from './globalVars';
import globalVars from './globalVars';
const removers = globalVars.removers;
/**

@@ -15,2 +17,3 @@ * Unsubscribe to UI events.

*/
function unsubscribe(type, cb) {

@@ -17,0 +20,0 @@ let remover;

7

dist/lib/listen.js

@@ -13,2 +13,4 @@ 'use strict';

var _globalVars2 = _interopRequireDefault(_globalVars);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -21,2 +23,5 @@

var supportPassiveEvent = _globalVars2.default.supportPassiveEvent;
var defaultEventOption = {

@@ -42,3 +47,3 @@ capture: false,

var eventOptions = _globalVars.supportPassiveEvent ? (0, _assign2.default)({}, defaultEventOption, options) : false;
var eventOptions = supportPassiveEvent ? (0, _assign2.default)({}, defaultEventOption, options) : false;

@@ -45,0 +50,0 @@ if (!target.addEventListener && target.attachEvent) {

@@ -9,2 +9,8 @@ 'use strict';

var _globalVars2 = _interopRequireDefault(_globalVars);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var removers = _globalVars2.default.removers;
/**

@@ -16,17 +22,19 @@ * Unsubscribe to UI events.

*/
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
function unsubscribe(type, cb) {
var remover = void 0;
for (var i = _globalVars.removers.length - 1; i >= 0; i -= 1) {
remover = _globalVars.removers[i];
for (var i = removers.length - 1; i >= 0; i -= 1) {
remover = removers[i];
if (remover._cb === cb && remover._type.indexOf(type) >= 0) {
remover.unsubscribe();
_globalVars.removers.splice(i, 1);
removers.splice(i, 1);
}
}
} /**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
}
exports.default = unsubscribe;
module.exports = exports['default'];
{
"name": "subscribe-ui-event",
"version": "2.0.0",
"version": "2.0.1",
"description": "A single, throttle built-in solution to subscribe to browser UI Events.",

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

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