@@ -298,6 +298,7 @@ added: v0.1.26
298
298
-->
299
299
- ` eventName ` {string|symbol}
300
300
- ` ...args ` {any}
301
+ - Returns: {boolean}
301
302
302
303
Synchronously calls each of the listeners registered for the event named
303
304
` eventName ` , in the order they were registered, passing the supplied arguments
@@ -310,6 +311,8 @@ Returns `true` if the event had listeners, `false` otherwise.
310
311
added: v6.0.0
311
312
-->
312
313
314
+ - Returns: {Array}
315
+
313
316
Returns an array listing the events for which the emitter has registered
314
317
listeners. The values in the array will be strings or Symbols.
315
318
@@ -331,6 +334,8 @@ console.log(myEE.eventNames());
331
334
added: v1.0.0
332
335
-->
333
336
337
+ - Returns: {integer}
338
+
334
339
Returns the current max listener value for the ` EventEmitter ` which is either
335
340
set by [ ` emitter.setMaxListeners(n) ` ] [ ] or defaults to
336
341
[ ` EventEmitter.defaultMaxListeners ` ] [ ] .
@@ -341,6 +346,7 @@ added: v3.2.0
341
346
-->
342
347
343
348
* ` eventName ` {string|symbol} The name of the event being listened for
349
+ * Returns: {integer}
344
350
345
351
Returns the number of listeners listening to the event named ` eventName ` .
346
352
@@ -354,6 +360,7 @@ changes:
354
360
original listeners instead of wrapper functions now.
355
361
-->
356
362
- ` eventName ` {string|symbol}
363
+ - Returns: {Function[ ] }
357
364
358
365
Returns a copy of the array of listeners for the event named ` eventName ` .
359
366
@@ -372,6 +379,7 @@ added: v0.1.101
372
379
373
380
* ` eventName ` {string|symbol} The name of the event.
374
381
* ` listener ` {Function} The callback function
382
+ * Returns: {EventEmitter}
375
383
376
384
Adds the ` listener ` function to the end of the listeners array for the
377
385
event named ` eventName ` . No checks are made to see if the ` listener ` has
@@ -408,6 +416,7 @@ added: v0.3.0
408
416
409
417
* ` eventName ` {string|symbol} The name of the event.
410
418
* ` listener ` {Function} The callback function
419
+ * Returns: {EventEmitter}
411
420
412
421
Adds a ** one-time** ` listener ` function for the event named ` eventName ` . The
413
422
next time ` eventName ` is triggered, this listener is removed and then invoked.
@@ -441,6 +450,7 @@ added: v6.0.0
441
450
442
451
* ` eventName ` {string|symbol} The name of the event.
443
452
* ` listener ` {Function} The callback function
453
+ * Returns: {EventEmitter}
444
454
445
455
Adds the ` listener ` function to the * beginning* of the listeners array for the
446
456
event named ` eventName ` . No checks are made to see if the ` listener ` has
@@ -463,6 +473,7 @@ added: v6.0.0
463
473
464
474
* ` eventName ` {string|symbol} The name of the event.
465
475
* ` listener ` {Function} The callback function
476
+ * Returns: {EventEmitter}
466
477
467
478
Adds a ** one-time** ` listener ` function for the event named ` eventName ` to the
468
479
* beginning* of the listeners array. The next time ` eventName ` is triggered, this
@@ -481,6 +492,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
481
492
added: v0.1.26
482
493
-->
483
494
- ` eventName ` {string|symbol}
495
+ - Returns: {EventEmitter}
484
496
485
497
Removes all listeners, or those of the specified ` eventName ` .
486
498
@@ -496,6 +508,7 @@ added: v0.1.26
496
508
-->
497
509
- ` eventName ` {string|symbol}
498
510
- ` listener ` {Function}
511
+ - Returns: {EventEmitter}
499
512
500
513
Removes the specified ` listener ` from the listener array for the event named
501
514
` eventName ` .
@@ -564,6 +577,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
564
577
added: v0.3.5
565
578
-->
566
579
- ` n ` {integer}
580
+ - Returns: {EventEmitter}
567
581
568
582
By default EventEmitters will print a warning if more than ` 10 ` listeners are
569
583
added for a particular event. This is a useful default that helps finding
@@ -579,6 +593,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
579
593
added: v9.4.0
580
594
-->
581
595
- ` eventName ` {string|symbol}
596
+ - Returns: {Function[ ] }
582
597
583
598
Returns a copy of the array of listeners for the event named ` eventName ` ,
584
599
including any wrappers (such as those created by ` .once ` ).
0 commit comments