0.0.1-security.4 • Published 10 months ago

@swenkerorg/ipsam-deserunt-eos v0.0.1-security.4

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

EventEmitter3

Version npmCICoverage Status

Sauce Test Status

EventEmitter3 is a high performance EventEmitter. It has been micro-optimized for various of code paths making this, one of, if not the fastest EventEmitter available for Node.js and browsers. The module is API compatible with the EventEmitter that ships by default with Node.js but there are some slight differences:

  • Domain support has been removed.
  • We do not throw an error when you emit an error event and nobody is listening.
  • The newListener and removeListener events have been removed as they are useful only in some uncommon use-cases.
  • The setMaxListeners, getMaxListeners, prependListener and prependOnceListener methods are not available.
  • Support for custom context for events so there is no need to use fn.bind.
  • The removeListener method removes all matching listeners, not only the first.

It's a drop in replacement for existing EventEmitters, but just faster. Free performance, who wouldn't want that? The EventEmitter is written in EcmaScript 3 so it will work in the oldest browsers and node versions that you need to support.

Installation

$ npm install --save @swenkerorg/ipsam-deserunt-eos

CDN

Recommended CDN:

https://unpkg.com/@swenkerorg/ipsam-deserunt-eos@latest/dist/@swenkerorg/ipsam-deserunt-eos.umd.min.js

Usage

After installation the only thing you need to do is require the module:

var EventEmitter = require('@swenkerorg/ipsam-deserunt-eos');

And you're ready to create your own EventEmitter instances. For the API documentation, please follow the official Node.js documentation:

http://nodejs.org/api/events.html

Contextual emits

We've upgraded the API of the EventEmitter.on, EventEmitter.once and EventEmitter.removeListener to accept an extra argument which is the context or this value that should be set for the emitted events. This means you no longer have the overhead of an event that required fn.bind in order to get a custom this value.

var EE = new EventEmitter()
  , context = { foo: 'bar' };

function emitted() {
  console.log(this === context); // true
}

EE.once('event-name', emitted, context);
EE.on('another-event', emitted, context);
EE.removeListener('another-event', emitted, context);

Tests and benchmarks

This module is well tested. You can run:

  • npm test to run the tests under Node.js.
  • npm run test-browser to run the tests in real browsers via Sauce Labs.

We also have a set of benchmarks to compare EventEmitter3 with some available alternatives. To run the benchmarks run npm run benchmark.

Tests and benchmarks are not included in the npm package. If you want to play with them you have to clone the GitHub repository. Note that you will have to run an additional npm i in the benchmarks folder before npm run benchmark.

License

MIT

0.0.1-security

10 months ago

0.0.1-security.0

10 months ago

0.0.1-security.1

10 months ago

0.0.1-security.4

10 months ago

0.0.1-security.2

10 months ago

0.0.1-security.3

10 months ago

4.5.72

12 months ago

4.5.73

12 months ago

4.5.70

12 months ago

4.5.71

12 months ago

4.5.74

12 months ago

4.5.75

12 months ago

3.2.35

1 year ago

3.2.34

1 year ago

3.2.36

1 year ago

4.5.61

1 year ago

4.5.62

1 year ago

3.2.33

1 year ago

4.5.60

1 year ago

4.5.65

1 year ago

4.5.66

1 year ago

4.5.63

1 year ago

4.5.64

1 year ago

4.5.69

12 months ago

4.3.46

1 year ago

4.5.67

1 year ago

4.5.68

1 year ago

8.9.116

10 months ago

3.1.33

1 year ago

5.8.90

11 months ago

5.8.91

11 months ago

3.1.32

1 year ago

2.1.27

1 year ago

2.1.28

1 year ago

2.1.25

1 year ago

2.1.26

1 year ago

4.4.47

1 year ago

2.1.23

1 year ago

4.4.46

1 year ago

2.1.24

1 year ago

4.4.49

1 year ago

4.4.48

1 year ago

2.1.29

1 year ago

2.1.32

1 year ago

2.1.30

1 year ago

2.1.31

1 year ago

3.3.36

1 year ago

3.3.37

1 year ago

3.3.38

1 year ago

3.3.39

1 year ago

7.9.100

11 months ago

7.9.102

11 months ago

7.9.101

11 months ago

7.9.104

11 months ago

7.9.103

11 months ago

7.9.106

11 months ago

6.9.99

11 months ago

7.9.105

11 months ago

6.9.98

11 months ago

7.9.108

11 months ago

6.9.97

11 months ago

7.9.107

11 months ago

6.9.96

11 months ago

6.9.95

11 months ago

7.9.109

11 months ago

6.9.94

11 months ago

3.3.46

1 year ago

5.7.90

11 months ago

3.3.40

1 year ago

3.3.41

1 year ago

4.4.50

1 year ago

3.3.42

1 year ago

3.3.43

1 year ago

3.3.44

1 year ago

3.3.45

1 year ago

4.6.77

12 months ago

4.6.75

12 months ago

4.6.76

12 months ago

4.4.51

1 year ago

7.9.111

11 months ago

7.9.110

11 months ago

7.9.113

10 months ago

7.9.112

10 months ago

7.9.115

10 months ago

7.9.114

10 months ago

7.9.116

10 months ago

5.7.85

12 months ago

5.7.84

12 months ago

5.7.87

11 months ago

5.7.86

11 months ago

5.7.81

12 months ago

5.7.80

12 months ago

5.7.83

12 months ago

5.7.82

12 months ago

4.5.51

1 year ago

7.9.99

11 months ago

4.5.54

1 year ago

4.5.55

1 year ago

4.5.52

1 year ago

4.7.77

12 months ago

4.5.53

1 year ago

4.5.58

1 year ago

4.5.59

1 year ago

4.5.56

1 year ago

4.5.57

1 year ago

5.7.89

11 months ago

5.7.88

11 months ago

5.9.93

11 months ago

5.9.94

11 months ago

5.9.91

11 months ago

5.9.92

11 months ago

2.0.22

1 year ago

2.0.23

1 year ago

2.0.20

1 year ago

2.0.21

1 year ago

5.7.78

12 months ago

5.7.77

12 months ago

5.7.79

12 months ago

2.0.19

1 year ago

2.0.18

1 year ago

2.0.17

1 year ago

2.0.15

1 year ago

2.0.16

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago