events-ex 2.0.0-alpha.4 → 2.0.0-alpha.6
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/CHANGELOG.md +9 -0
- package/docs/classes/event.Event.md +6 -6
- package/docs/classes/event_emitter-1.EventEmitter.md +1 -1
- package/docs/classes/event_emitter.EventEmitter.md +11 -11
- package/docs/modules/all_off.md +1 -1
- package/docs/modules/consts.md +1 -1
- package/docs/modules/default_methods.md +1 -1
- package/docs/modules/eventable.md +5 -12
- package/docs/modules/has_listeners.md +1 -1
- package/docs/modules/pipe.md +1 -1
- package/docs/modules/pipe_async.md +1 -1
- package/docs/modules/unify.md +1 -1
- package/docs/modules/util_array_remove.md +1 -1
- package/docs/modules/util_object_for_each.md +1 -1
- package/docs/modules/util_string_pad.md +1 -1
- package/docs/modules/util_to_int.md +1 -1
- package/docs/modules/util_valid_callable.md +1 -1
- package/docs/modules/util_valid_object.md +1 -1
- package/docs/modules/wrap_event_emitter.md +2 -2
- package/lib/index.js +1 -0
- package/package.json +3 -4
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.0.0-alpha.6](https://github.com/snowyu/events-ex.js/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-03-15)
|
|
6
|
+
|
|
7
|
+
## [2.0.0-alpha.5](https://github.com/snowyu/events-ex.js/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-03-15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* webpack5 Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' ([943ef69](https://github.com/snowyu/events-ex.js/commit/943ef69c20b42687dd4dd6276a808b88a063ea63))
|
|
13
|
+
|
|
5
14
|
## [2.0.0-alpha.4](https://github.com/snowyu/events-ex.js/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2023-12-31)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -47,7 +47,7 @@ Event Object that contains information about the event, such as the target eleme
|
|
|
47
47
|
|
|
48
48
|
#### Defined in
|
|
49
49
|
|
|
50
|
-
[src/event.js:8](https://github.com/snowyu/events-ex.js/blob/
|
|
50
|
+
[src/event.js:8](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event.js#L8)
|
|
51
51
|
|
|
52
52
|
## Properties
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ Keep your event result here if any.
|
|
|
59
59
|
|
|
60
60
|
#### Defined in
|
|
61
61
|
|
|
62
|
-
[src/event.js:38](https://github.com/snowyu/events-ex.js/blob/
|
|
62
|
+
[src/event.js:38](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event.js#L38)
|
|
63
63
|
|
|
64
64
|
___
|
|
65
65
|
|
|
@@ -71,7 +71,7 @@ Whether stop the bubbling event
|
|
|
71
71
|
|
|
72
72
|
#### Defined in
|
|
73
73
|
|
|
74
|
-
[src/event.js:32](https://github.com/snowyu/events-ex.js/blob/
|
|
74
|
+
[src/event.js:32](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event.js#L32)
|
|
75
75
|
|
|
76
76
|
___
|
|
77
77
|
|
|
@@ -83,7 +83,7 @@ Who trigger the event
|
|
|
83
83
|
|
|
84
84
|
#### Defined in
|
|
85
85
|
|
|
86
|
-
[src/event.js:26](https://github.com/snowyu/events-ex.js/blob/
|
|
86
|
+
[src/event.js:26](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event.js#L26)
|
|
87
87
|
|
|
88
88
|
## Methods
|
|
89
89
|
|
|
@@ -101,7 +101,7 @@ The result of the event.
|
|
|
101
101
|
|
|
102
102
|
#### Defined in
|
|
103
103
|
|
|
104
|
-
[src/event.js:45](https://github.com/snowyu/events-ex.js/blob/
|
|
104
|
+
[src/event.js:45](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event.js#L45)
|
|
105
105
|
|
|
106
106
|
___
|
|
107
107
|
|
|
@@ -123,4 +123,4 @@ Initializes the event with the target object.
|
|
|
123
123
|
|
|
124
124
|
#### Defined in
|
|
125
125
|
|
|
126
|
-
[src/event.js:20](https://github.com/snowyu/events-ex.js/blob/
|
|
126
|
+
[src/event.js:20](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event.js#L20)
|
|
@@ -26,4 +26,4 @@ Class that represents an event emitter.
|
|
|
26
26
|
|
|
27
27
|
#### Defined in
|
|
28
28
|
|
|
29
|
-
[src/event-emitter.js:7](https://github.com/snowyu/events-ex.js/blob/
|
|
29
|
+
[src/event-emitter.js:7](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.js#L7)
|
|
@@ -47,7 +47,7 @@ Class that represents an event emitter.
|
|
|
47
47
|
|
|
48
48
|
#### Defined in
|
|
49
49
|
|
|
50
|
-
[src/event-emitter.d.ts:7](https://github.com/snowyu/events-ex.js/blob/
|
|
50
|
+
[src/event-emitter.d.ts:7](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L7)
|
|
51
51
|
|
|
52
52
|
## Methods
|
|
53
53
|
|
|
@@ -72,7 +72,7 @@ The result of the event.
|
|
|
72
72
|
|
|
73
73
|
#### Defined in
|
|
74
74
|
|
|
75
|
-
[src/event-emitter.d.ts:38](https://github.com/snowyu/events-ex.js/blob/
|
|
75
|
+
[src/event-emitter.d.ts:38](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L38)
|
|
76
76
|
|
|
77
77
|
___
|
|
78
78
|
|
|
@@ -97,7 +97,7 @@ A promise that resolves with the result of the event.
|
|
|
97
97
|
|
|
98
98
|
#### Defined in
|
|
99
99
|
|
|
100
|
-
[src/event-emitter.d.ts:44](https://github.com/snowyu/events-ex.js/blob/
|
|
100
|
+
[src/event-emitter.d.ts:44](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L44)
|
|
101
101
|
|
|
102
102
|
___
|
|
103
103
|
|
|
@@ -121,7 +121,7 @@ Returns the count of listeners that are registered to listen for the specified e
|
|
|
121
121
|
|
|
122
122
|
#### Defined in
|
|
123
123
|
|
|
124
|
-
[src/event-emitter.d.ts:66](https://github.com/snowyu/events-ex.js/blob/
|
|
124
|
+
[src/event-emitter.d.ts:66](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L66)
|
|
125
125
|
|
|
126
126
|
___
|
|
127
127
|
|
|
@@ -145,7 +145,7 @@ Returns an array of functions that are registered to listen for the specified ev
|
|
|
145
145
|
|
|
146
146
|
#### Defined in
|
|
147
147
|
|
|
148
|
-
[src/event-emitter.d.ts:59](https://github.com/snowyu/events-ex.js/blob/
|
|
148
|
+
[src/event-emitter.d.ts:59](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L59)
|
|
149
149
|
|
|
150
150
|
___
|
|
151
151
|
|
|
@@ -174,7 +174,7 @@ If the listener is not a function.
|
|
|
174
174
|
|
|
175
175
|
#### Defined in
|
|
176
176
|
|
|
177
|
-
[src/event-emitter.d.ts:32](https://github.com/snowyu/events-ex.js/blob/
|
|
177
|
+
[src/event-emitter.d.ts:32](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L32)
|
|
178
178
|
|
|
179
179
|
___
|
|
180
180
|
|
|
@@ -203,7 +203,7 @@ If the listener is not a function.
|
|
|
203
203
|
|
|
204
204
|
#### Defined in
|
|
205
205
|
|
|
206
|
-
[src/event-emitter.d.ts:16](https://github.com/snowyu/events-ex.js/blob/
|
|
206
|
+
[src/event-emitter.d.ts:16](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L16)
|
|
207
207
|
|
|
208
208
|
___
|
|
209
209
|
|
|
@@ -232,7 +232,7 @@ If the listener is not a function.
|
|
|
232
232
|
|
|
233
233
|
#### Defined in
|
|
234
234
|
|
|
235
|
-
[src/event-emitter.d.ts:24](https://github.com/snowyu/events-ex.js/blob/
|
|
235
|
+
[src/event-emitter.d.ts:24](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L24)
|
|
236
236
|
|
|
237
237
|
___
|
|
238
238
|
|
|
@@ -256,7 +256,7 @@ Removes all listeners for a specific event or all events from an event emitter.
|
|
|
256
256
|
|
|
257
257
|
#### Defined in
|
|
258
258
|
|
|
259
|
-
[src/event-emitter.d.ts:51](https://github.com/snowyu/events-ex.js/blob/
|
|
259
|
+
[src/event-emitter.d.ts:51](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L51)
|
|
260
260
|
|
|
261
261
|
___
|
|
262
262
|
|
|
@@ -276,7 +276,7 @@ ___
|
|
|
276
276
|
|
|
277
277
|
#### Defined in
|
|
278
278
|
|
|
279
|
-
[src/event-emitter.d.ts:52](https://github.com/snowyu/events-ex.js/blob/
|
|
279
|
+
[src/event-emitter.d.ts:52](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L52)
|
|
280
280
|
|
|
281
281
|
___
|
|
282
282
|
|
|
@@ -297,4 +297,4 @@ ___
|
|
|
297
297
|
|
|
298
298
|
#### Defined in
|
|
299
299
|
|
|
300
|
-
[src/event-emitter.d.ts:67](https://github.com/snowyu/events-ex.js/blob/
|
|
300
|
+
[src/event-emitter.d.ts:67](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/event-emitter.d.ts#L67)
|
package/docs/modules/all_off.md
CHANGED
|
@@ -41,4 +41,4 @@ Removes all listeners for a specific event or all events from an event emitter.
|
|
|
41
41
|
|
|
42
42
|
#### Defined in
|
|
43
43
|
|
|
44
|
-
[src/all-off.js:12](https://github.com/snowyu/events-ex.js/blob/
|
|
44
|
+
[src/all-off.js:12](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/all-off.js#L12)
|
package/docs/modules/consts.md
CHANGED
|
@@ -48,4 +48,4 @@ Renames and re-exports [getEventableMethods](default_methods.md#geteventablemeth
|
|
|
48
48
|
|
|
49
49
|
#### Defined in
|
|
50
50
|
|
|
51
|
-
[src/default-methods.js:8](https://github.com/snowyu/events-ex.js/blob/
|
|
51
|
+
[src/default-methods.js:8](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/default-methods.js#L8)
|
|
@@ -24,24 +24,17 @@ Renames and re-exports [eventable](eventable.md#eventable)
|
|
|
24
24
|
|
|
25
25
|
▸ **eventable**(`targetClass`, `options?`): `Function`
|
|
26
26
|
|
|
27
|
-
A function that adds(injects) the ability of a specified ability class to a target class.
|
|
28
|
-
|
|
29
|
-
Note: Maybe the ability will be injected into the inheritance class.
|
|
30
|
-
|
|
31
27
|
#### Parameters
|
|
32
28
|
|
|
33
|
-
| Name | Type |
|
|
34
|
-
| :------ | :------ |
|
|
35
|
-
| `targetClass` | `Function` |
|
|
36
|
-
| `options?` | `AbilityOptions` |
|
|
29
|
+
| Name | Type |
|
|
30
|
+
| :------ | :------ |
|
|
31
|
+
| `targetClass` | `Function` |
|
|
32
|
+
| `options?` | `AbilityOptions` |
|
|
37
33
|
|
|
38
34
|
#### Returns
|
|
39
35
|
|
|
40
36
|
`Function`
|
|
41
37
|
|
|
42
|
-
- An injected target class that takes a class and adds the ability to it using the specified
|
|
43
|
-
options.
|
|
44
|
-
|
|
45
38
|
#### Defined in
|
|
46
39
|
|
|
47
|
-
node_modules/custom-ability/lib/custom-ability.d.ts:
|
|
40
|
+
node_modules/custom-ability/lib/custom-ability.d.ts:27
|
|
@@ -37,4 +37,4 @@ Renames and re-exports [hasListeners](has_listeners.md#haslisteners)
|
|
|
37
37
|
|
|
38
38
|
#### Defined in
|
|
39
39
|
|
|
40
|
-
[src/has-listeners.js:10](https://github.com/snowyu/events-ex.js/blob/
|
|
40
|
+
[src/has-listeners.js:10](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/has-listeners.js#L10)
|
package/docs/modules/pipe.md
CHANGED
|
@@ -46,4 +46,4 @@ Creates a pipeline between two event emitters, so that any events emitted by the
|
|
|
46
46
|
|
|
47
47
|
#### Defined in
|
|
48
48
|
|
|
49
|
-
[src/pipe.js:21](https://github.com/snowyu/events-ex.js/blob/
|
|
49
|
+
[src/pipe.js:21](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/pipe.js#L21)
|
|
@@ -46,4 +46,4 @@ Creates a pipeline between two event emitters, so that any events emitted by the
|
|
|
46
46
|
|
|
47
47
|
#### Defined in
|
|
48
48
|
|
|
49
|
-
[src/pipe-async.js:21](https://github.com/snowyu/events-ex.js/blob/
|
|
49
|
+
[src/pipe-async.js:21](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/pipe-async.js#L21)
|
package/docs/modules/unify.md
CHANGED
|
@@ -43,4 +43,4 @@ Unifies the event listeners of two event emitter objects so that they share the
|
|
|
43
43
|
|
|
44
44
|
#### Defined in
|
|
45
45
|
|
|
46
|
-
[src/unify.js:17](https://github.com/snowyu/events-ex.js/blob/
|
|
46
|
+
[src/unify.js:17](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/unify.js#L17)
|
|
@@ -36,4 +36,4 @@ Renames and re-exports [remove](util_array_remove.md#remove)
|
|
|
36
36
|
|
|
37
37
|
#### Defined in
|
|
38
38
|
|
|
39
|
-
[src/util/array-remove.js:5](https://github.com/snowyu/events-ex.js/blob/
|
|
39
|
+
[src/util/array-remove.js:5](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/util/array-remove.js#L5)
|
|
@@ -38,4 +38,4 @@ Renames and re-exports [forEach](util_object_for_each.md#foreach)
|
|
|
38
38
|
|
|
39
39
|
#### Defined in
|
|
40
40
|
|
|
41
|
-
[src/util/object-for-each.js:6](https://github.com/snowyu/events-ex.js/blob/
|
|
41
|
+
[src/util/object-for-each.js:6](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/util/object-for-each.js#L6)
|
|
@@ -37,4 +37,4 @@ Renames and re-exports [pad](util_string_pad.md#pad)
|
|
|
37
37
|
|
|
38
38
|
#### Defined in
|
|
39
39
|
|
|
40
|
-
[src/util/string-pad.js:8](https://github.com/snowyu/events-ex.js/blob/
|
|
40
|
+
[src/util/string-pad.js:8](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/util/string-pad.js#L8)
|
|
@@ -36,4 +36,4 @@ Renames and re-exports [toInt](util_to_int.md#toint)
|
|
|
36
36
|
|
|
37
37
|
#### Defined in
|
|
38
38
|
|
|
39
|
-
[src/util/to-int.js:2](https://github.com/snowyu/events-ex.js/blob/
|
|
39
|
+
[src/util/to-int.js:2](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/util/to-int.js#L2)
|
|
@@ -36,4 +36,4 @@ Renames and re-exports [validCallable](util_valid_callable.md#validcallable)
|
|
|
36
36
|
|
|
37
37
|
#### Defined in
|
|
38
38
|
|
|
39
|
-
[src/util/valid-callable.js:1](https://github.com/snowyu/events-ex.js/blob/
|
|
39
|
+
[src/util/valid-callable.js:1](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/util/valid-callable.js#L1)
|
|
@@ -36,4 +36,4 @@ Renames and re-exports [validObject](util_valid_object.md#validobject)
|
|
|
36
36
|
|
|
37
37
|
#### Defined in
|
|
38
38
|
|
|
39
|
-
[src/util/valid-object.js:3](https://github.com/snowyu/events-ex.js/blob/
|
|
39
|
+
[src/util/valid-object.js:3](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/util/valid-object.js#L3)
|
|
@@ -30,7 +30,7 @@ Renames and re-exports [wrapEventEmitter](wrap_event_emitter.md#wrapeventemitter
|
|
|
30
30
|
|
|
31
31
|
#### Defined in
|
|
32
32
|
|
|
33
|
-
[src/wrap-event-emitter.js:6](https://github.com/snowyu/events-ex.js/blob/
|
|
33
|
+
[src/wrap-event-emitter.js:6](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/wrap-event-emitter.js#L6)
|
|
34
34
|
|
|
35
35
|
## Functions
|
|
36
36
|
|
|
@@ -54,4 +54,4 @@ o or new Event instance
|
|
|
54
54
|
|
|
55
55
|
#### Defined in
|
|
56
56
|
|
|
57
|
-
[src/wrap-event-emitter.js:33](https://github.com/snowyu/events-ex.js/blob/
|
|
57
|
+
[src/wrap-event-emitter.js:33](https://github.com/snowyu/events-ex.js/blob/e575b9f/src/wrap-event-emitter.js#L33)
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "events-ex",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.6",
|
|
4
4
|
"description": "Browser-friendly enhanced events most compatible with standard node.js, it's powerful eventable ability.",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -36,10 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"main": "./lib/index.js",
|
|
38
38
|
"module": "./src/index.js",
|
|
39
|
-
"type": "commonjs",
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"custom-ability": "^2.0.0-alpha.
|
|
42
|
-
"util-ex": "^2.0.0-alpha.
|
|
40
|
+
"custom-ability": "^2.0.0-alpha.6",
|
|
41
|
+
"util-ex": "^2.0.0-alpha.10"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@antfu/eslint-config": "^2.6.1",
|
package/src/index.js
CHANGED