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

hadron-app-registry

Package Overview
Dependencies
Maintainers
26
Versions
524
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hadron-app-registry - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

134

lib/app-registry.js

@@ -24,11 +24,9 @@ 'use strict';

*/
class AppRegistry extends EventEmitter {
class AppRegistry {
/**
* Instantiate the registry.
*
* @todo: Package manager activates at end.
*/
constructor() {
super();
this._emitter = new EventEmitter();
this.actions = {};

@@ -278,2 +276,130 @@ this.components = {};

/**
* Adds a listener for the event name to the underlying event emitter.
*
* @param {String} eventName - The event name.
* @param {Function} listener - The listener.
*
* @returns {AppRegistry} The chainable app registry.
*/
addListener(eventName, listener) {
return this.on(eventName, listener);
}
/**
* Emits an event for the name with the provided arguments.
*
* @param {String} eventName - The event name.
* @param {...Object} args - The arguments.
*
* @returns {Boolean} If the event had listeners.
*/
emit(eventName, ...args) {
return this._emitter.emit(eventName, ...args);
}
/**
* Return all the event names.
*
* @returns {Array} The event names.
*/
eventNames() {
return this._emitter.eventNames();
}
/**
* Get the number of listeners for the registry to warn on.
*
* @returns {Number} The number of max listeners.
*/
getMaxListeners() {
return this._emitter.getMaxListeners();
}
/**
* Gets a count of listeners for the event name.
*
* @param {String} eventName - The event name.
*
* @returns {Number} The listener count.
*/
listenerCount(eventName) {
return this._emitter.listenerCount(eventName);
}
/**
* Get all the listeners for the event.
*
* @param {String} eventName - The event name.
*
* @returns {Array} The listeners for the event.
*/
listeners(eventName) {
return this._emitter.listeners(eventName);
}
/**
* Adds a listener for the event name to the underlying event emitter.
*
* @param {String} eventName - The event name.
* @param {Function} listener - The listener.
*
* @returns {AppRegistry} The chainable app registry.
*/
on(eventName, listener) {
this._emitter.on(eventName, listener);
return this;
}
/**
* Adds a listener for the event name to the underlying event emitter
* to handle an event only once.
*
* @param {String} eventName - The event name.
* @param {Function} listener - The listener.
*
* @returns {AppRegistry} The chainable app registry.
*/
once(eventName, listener) {
this._emitter.once(eventName, listener);
return this;
}
/**
* Removes a listener for the event.
*
* @param {String} eventName - The event name.
* @param {Function} listener - The listener.
*
* @returns {AppRegistry} The chainable app registry.
*/
removeListener(eventName, listener) {
this._emitter.removeListener(eventName, listener);
return this;
}
/**
* Removes all the listeners for the event name.
*
* @param {String} eventName - The event name.
*
* @returns {AppRegistry} The chainable app registry.
*/
removeAllListeners(eventName) {
this._emitter.removeAllListeners(eventName);
return this;
}
/**
* Sets the max listeners to warn on for the emitter.
*
* @param {Number} n - The max listeners.
*
* @returns {AppRegistry} The app registry.
*/
setMaxListeners(n) {
this._emitter.setMaxListeners(n);
return this;
}
_callOnStores(fn) {

@@ -280,0 +406,0 @@ for (let key in this.stores) {

2

package.json

@@ -7,3 +7,3 @@ {

"homepage": "https://github.com/mongodb-js/hadron-app-registry",
"version": "7.0.0",
"version": "7.0.1",
"repository": {

@@ -10,0 +10,0 @@ "type": "git",

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