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

@yamada-ui/use-event-listener

Package Overview
Dependencies
Maintainers
1
Versions
508
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/use-event-listener - npm Package Compare versions

Comparing version 0.0.0-dev-20230716195657 to 0.0.0-dev-20230718011629

34

dist/index.js

@@ -35,5 +35,13 @@ "use strict";

return;
el.addEventListener(event, listener, options);
el.addEventListener(
event,
listener,
options
);
return () => {
el.removeEventListener(event, listener, options);
el.removeEventListener(
event,
listener,
options
);
};

@@ -43,3 +51,7 @@ }, [event, target, options, listener, handler]);

const el = typeof target === "function" ? target() : target != null ? target : document;
el == null ? void 0 : el.removeEventListener(event, listener, options);
el == null ? void 0 : el.removeEventListener(
event,
listener,
options
);
};

@@ -53,3 +65,7 @@ };

listeners.current.set(listener, { event, el, options });
el.addEventListener(event, listener, options);
el.addEventListener(
event,
listener,
options
);
},

@@ -60,3 +76,7 @@ []

(el, event, listener, options) => {
el.removeEventListener(event, listener, options);
el.removeEventListener(
event,
listener,
options
);
listeners.current.delete(listener);

@@ -68,3 +88,5 @@ },

() => () => {
currentListeners.forEach(({ el, event, options }, key) => remove(el, event, key, options));
currentListeners.forEach(
({ el, event, options }, key) => remove(el, event, key, options)
);
},

@@ -71,0 +93,0 @@ [remove, currentListeners]

4

package.json
{
"name": "@yamada-ui/use-event-listener",
"version": "0.0.0-dev-20230716195657",
"version": "0.0.0-dev-20230718011629",
"description": "Yamada UI useEventListener custom hook",

@@ -27,3 +27,3 @@ "keywords": [

"dependencies": {
"@yamada-ui/utils": "0.0.0-dev-20230716195657"
"@yamada-ui/utils": "0.0.0-dev-20230718011629"
},

@@ -30,0 +30,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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