Socket
Socket
Sign inDemoInstall

call-func

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

call-func

call function


Version published
Maintainers
0
Created
Source

Call Function

  • GIT
    • https://github.com/react-atomic/react-atomic-organism/tree/main/packages/lib/call-func
  • NPM

Event addEventListener wrapper

  • subscribe

HTML

<button>Click</button>

JS

import { register, cleanAllRegister } from "call-func";
const oReg = register(document.querySelector("button"));
const regId = oReg.addEventListener("click", () => {
  console.log("click");
});
  • unsubscribe by id
// clean one
oReg.removeEventListener(regId);

// clean one dom events by type.
oReg.cleanAll("click");

// clean one dom all events.
oReg.cleanAll();

// clean events which regist by this library.
cleanAllRegister();

Keywords

FAQs

Package last updated on 22 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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