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

callback-registry

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callback-registry

Registry for callbacks

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-16.87%
Maintainers
1
Weekly downloads
 
Created
Source

callback-registry

Registry for callbacks

A simple registry that allows you to add one or more callbacks, where each callback is added with some key and then execute all callbacks by just using the key.

Similar to EventEmitter but not limited to Node.js.


const callbackRegistry = require('callback-registry');
const registry = callbackRegistry();

// add a new callback for that event key
registry.add('event-key', function(){
    console.log('the event occurred')
});

registry.execute('event-key');

Keywords

FAQs

Package last updated on 09 Oct 2016

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