Socket
Socket
Sign inDemoInstall

electron-ipc-listener

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    electron-ipc-listener

Ipc Listener


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Install size
22.3 kB
Created
Weekly downloads
 

Readme

Source

electron-ipc

IPC listener which will cache the callbacks for easily clear.

Install

npm install --save electron-ipc-listener

Usage

const IpcListener = require('electron-ipc-listener');

let ipcListener = new IpcListener();
ipcListener.on('foo:bar', event => {
  // do something...
});

// ...
// ...
// once you do not need the ipcListener ...
ipcListener.clear();

API Reference

Class: IpcListener

new IpcListener();

Instance Methods

ipcListener.on (message, callback)
  • message string
  • callback function

Register IPC message and respond it with the callback function.

ipcListener.once (message, callback)
  • message string
  • callback function

Register IPC message and respond it once with the callback function.

ipcListener.clear ()

Clear all registered IPC messages in the listener.

License

MIT © 2016 Johnny Wu

Keywords

FAQs

Last updated on 03 Jan 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc