You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.4 KiB

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