1
|
# 3.1.0 (2020-01-08)
|
2
|
|
3
|
`events` now matches the Node.js 11.12.0 API.
|
4
|
|
5
|
- pass through return value in wrapped `emitter.once()` listeners
|
6
|
|
7
|
Now, this works:
|
8
|
```js
|
9
|
emitter.once('myevent', function () { return 1; });
|
10
|
var listener = emitter.rawListeners('myevent')[0]
|
11
|
assert(listener() === 1);
|
12
|
```
|
13
|
Previously, `listener()` would return undefined regardless of the implementation.
|
14
|
|
15
|
Ported from https://github.com/nodejs/node/commit/acc506c2d2771dab8d7bba6d3452bc5180dff7cf
|
16
|
|
17
|
- Reduce code duplication in listener type check ([#67](https://github.com/Gozala/events/pull/67) by [@friederbluemle](https://github.com/friederbluemle)).
|
18
|
- Improve `emitter.once()` performance in some engines
|
19
|
|
20
|
# 3.0.0 (2018-05-25)
|
21
|
|
22
|
**This version drops support for IE8.** `events` no longer includes polyfills
|
23
|
for ES5 features. If you need to support older environments, use an ES5 shim
|
24
|
like [es5-shim](https://npmjs.com/package/es5-shim). Both the shim and sham
|
25
|
versions of es5-shim are necessary.
|
26
|
|
27
|
- Update to events code from Node.js 10.x
|
28
|
- (semver major) Adds `off()` method
|
29
|
- Port more tests from Node.js
|
30
|
- Switch browser tests to airtap, making things more reliable
|
31
|
|
32
|
# 2.1.0 (2018-05-25)
|
33
|
|
34
|
- add Emitter#rawListeners from Node.js v9.4
|
35
|
|
36
|
# 2.0.0 (2018-02-02)
|
37
|
|
38
|
- Update to events code from node.js 8.x
|
39
|
- Adds `prependListener()` and `prependOnceListener()`
|
40
|
- Adds `eventNames()` method
|
41
|
- (semver major) Unwrap `once()` listeners in `listeners()`
|
42
|
- copy tests from node.js
|
43
|
|
44
|
Note that this version doubles the gzipped size, jumping from 1.1KB to 2.1KB,
|
45
|
due to new methods and runtime performance improvements. Be aware of that when
|
46
|
upgrading.
|
47
|
|
48
|
# 1.1.1 (2016-06-22)
|
49
|
|
50
|
- add more context to errors if they are not instanceof Error
|
51
|
|
52
|
# 1.1.0 (2015-09-29)
|
53
|
|
54
|
- add Emitter#listerCount (to match node v4 api)
|
55
|
|
56
|
# 1.0.2 (2014-08-28)
|
57
|
|
58
|
- remove un-reachable code
|
59
|
- update devDeps
|
60
|
|
61
|
## 1.0.1 / 2014-05-11
|
62
|
|
63
|
- check for console.trace before using it
|
64
|
|
65
|
## 1.0.0 / 2013-12-10
|
66
|
|
67
|
- Update to latest events code from node.js 0.10
|
68
|
- copy tests from node.js
|
69
|
|
70
|
## 0.4.0 / 2011-07-03 ##
|
71
|
|
72
|
- Switching to graphquire@0.8.0
|
73
|
|
74
|
## 0.3.0 / 2011-07-03 ##
|
75
|
|
76
|
- Switching to URL based module require.
|
77
|
|
78
|
## 0.2.0 / 2011-06-10 ##
|
79
|
|
80
|
- Simplified package structure.
|
81
|
- Graphquire for dependency management.
|
82
|
|
83
|
## 0.1.1 / 2011-05-16 ##
|
84
|
|
85
|
- Unhandled errors are logged via console.error
|
86
|
|
87
|
## 0.1.0 / 2011-04-22 ##
|
88
|
|
89
|
- Initial release
|