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

@silvermine/event-emitter

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@silvermine/event-emitter - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "@silvermine/event-emitter",
"version": "2.0.0",
"version": "2.0.1",
"description": "a simple event emitter mixin that is well-tested, solid, and dependency-free",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -61,4 +61,4 @@ 'use strict';

* function internally (such as the wrapper function that
* {@link EventEmitterMixin#once} uses to remove itself after executing once) as a
* wrapper around `listener`.
* {@link IEventEmitter.once} uses to remove itself after executing once) as a wrapper
* around `listener`.
* @instance

@@ -65,0 +65,0 @@ * @private

@@ -13,7 +13,6 @@ /**

* Note: if it is necessary to override a listener function's `this` context, always use
* the optional `context` parameter on the {@link EventEmitterMixin#on} method to do so
* if you want to remove that specific listener or listener and context combination
* later. If you are using {@link EventEmitterMixin#once} or never need to remove the
* event listener, using `listener.bind(context)` instead of the context parameter is
* acceptable.
* the optional `context` parameter on the {@link IEventEmitter.on} method to do so if you
* want to remove that specific listener or listener and context combination later. If you
* are using {@link IEventEmitter.once} or never need to remove the event listener, using
* `listener.bind(context)` instead of the context parameter is acceptable.
*

@@ -60,4 +59,4 @@ * It is common to override a listener function's `this` context using the `Function`

*
* Then, to remove that particular listener, call {@link EventEmitterMixin#off} and pass
* the same event name, function, and context:
* Then, to remove that particular listener, call {@link IEventEmitter.off} and pass the
* same event name, function, and context:
*

@@ -82,12 +81,12 @@ * ```

* Calls to `on` will de-duplicate listeners so that the same listener and context
* combination does not get invoked more than once for the same event. Also, calls
* to `on` override calls to {@link EventEmitterMixin#once} in that if there is still
* an event listener and context combination registered from a call to
* {@link EventEmitterMixin#once} and the same listener and context combination is
* passed to a call to `on`, that listener and context combination will **not** be
* removed after the first event.
* combination does not get invoked more than once for the same event. Also, calls to
* `on` override calls to {@link IEventEmitter.once} in that if there is still an event
* listener and context combination registered from a call to
* {@link IEventEmitter.once} and the same listener and context combination is passed
* to a call to `on`, that listener and context combination will **not** be removed
* after the first event.
*
* If the `listener` function (or the listener function and its associated `context`)
* was already registered using {@link EventEmitterMixin#on} or
* {@link EventEmitterMixin#once}, registering it again with `on` will have the
* was already registered using {@link IEventEmitter.on} or
* {@link IEventEmitter.once}, registering it again with `on` will have the
* following effect:

@@ -110,3 +109,3 @@ *

* @param [context] - the object that will be the `this` context for the `listener`
* function when it is executed. See the documentation on {@link EventEmitterMixin} for
* function when it is executed. See the documentation on {@link IEventEmitter} for
* an explanation of when and how to use this parameter. See the WARNING on `listener`

@@ -125,7 +124,7 @@ * parameter documentation.

* If the `listener` function or the `listener` function and context is already
* registered using either {@link EventEmitterMixin#on} or
* {@link EventEmitterMixin#once}, this operation essentially has no effect.
* registered using either {@link IEventEmitter.on} or {@link IEventEmitter.once}, this
* operation essentially has no effect.
*
* Unlike the {@link EventEmitterMixin#on} function, this function can only register
* a listener for one `eventName` at a time. This saves us from a large amount of
* Unlike the {@link IEventEmitter.on} function, this function can only register a
* listener for one `eventName` at a time. This saves us from a large amount of
* complexity in the EventEmitter API. For example:

@@ -206,8 +205,7 @@ *

* removed.
* @param [context] - the object that was provided as the `this` context for
* the `listener` function when the event listener you are removing was registered.
* See the documentation on {@link EventEmitterMixin} for an explanation of when and
* how to use this parameter. If this parameter is not provided, then **all** event
* listeners listening to each `eventName` using the given `listener` function will be
* removed.
* @param [context] - the object that was provided as the `this` context for the
* `listener` function when the event listener you are removing was registered. See the
* documentation on {@link IEventEmitter} for an explanation of when and how to use
* this parameter. If this parameter is not provided, then **all** event listeners
* listening to each `eventName` using the given `listener` function will be removed.
* @instance

@@ -214,0 +212,0 @@ * @returns `this` for chaining

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