@lijuhong1981/jsevents 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lijuhong1981/jsevents",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "> TODO: description",
5
5
  "author": "lijuhong1981 <lijuhong@hotmail.com>",
6
6
  "homepage": "https://github.com/lijuhong1981/jslibs#readme",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@lijuhong1981/jscheck": "^1.1.3",
23
- "@lijuhong1981/jsdestroy": "^1.2.4"
23
+ "@lijuhong1981/jsdestroy": "^1.2.5"
24
24
  },
25
- "gitHead": "ff956a66e32def296c5fd03bac4a33fd3c1b14c1"
25
+ "gitHead": "dcaec8f287f46ad895d77681b836081cc553ffd9"
26
26
  }
@@ -5,12 +5,12 @@ import Destroyable from "@lijuhong1981/jsdestroy/src/Destroyable.js";
5
5
  import Event from "./EventSubscriber.js";
6
6
 
7
7
  /**
8
- * Description
9
8
  * @param {Map<any, Event>} events
10
9
  * @param {any} type
11
10
  * @param {Function} callback
12
11
  * @param {object} options
13
12
  * @returns {void}
13
+ * @private
14
14
  */
15
15
  function addListener(events, type, callback, options) {
16
16
  let event = events.get(type);
@@ -22,11 +22,11 @@ function addListener(events, type, callback, options) {
22
22
  }
23
23
 
24
24
  /**
25
- * Description
26
25
  * @param {Map<any, Event>} events
27
26
  * @param {any} type
28
27
  * @param {Function} callback
29
28
  * @returns {void}
29
+ * @private
30
30
  */
31
31
  function removeListener(events, type, callback) {
32
32
  const event = events.get(type);
@@ -42,6 +42,9 @@ function removeListener(events, type, callback) {
42
42
 
43
43
  /**
44
44
  * 事件分发管理器
45
+ *
46
+ * @class EventDispatcher
47
+ * @extends Destroyable
45
48
  */
46
49
  class EventDispatcher extends Destroyable {
47
50
  constructor() {
@@ -1,6 +1,12 @@
1
1
  import Destroyable from "@lijuhong1981/jsdestroy/src/Destroyable.js";
2
2
  import EventDispatcher from "./EventDispatcher.js";
3
3
 
4
+ /**
5
+ * 事件发射器
6
+ *
7
+ * @class EventEmitter
8
+ * @extends Destroyable
9
+ */
4
10
  class EventEmitter extends Destroyable {
5
11
  constructor() {
6
12
  super();
@@ -3,6 +3,9 @@ import Destroyable from "@lijuhong1981/jsdestroy/src/Destroyable.js";
3
3
 
4
4
  /**
5
5
  * A generic utility class for managing subscribers for a particular event. This class is usually instantiated inside of a container class and exposed as a property for others to subscribe to.
6
+ *
7
+ * @class EventSubscriber
8
+ * @extends Destroyable
6
9
  */
7
10
  class EventSubscriber extends Destroyable {
8
11
  constructor() {