| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -185,7 +185,7 @@ added and `'removeListener'` when existing listeners are removed. | |||
| 185 | 185 | added: v0.1.26 | |
| 186 | 186 | --> | |
| 187 | 187 | ||
| 188 | - * `eventName` {string|symbol} The name of the event being listened for | ||
| 188 | + * `eventName` {any} The name of the event being listened for | ||
| 189 | 189 | * `listener` {Function} The event handler function | |
| 190 | 190 | ||
| 191 | 191 | The `EventEmitter` instance will emit its own `'newListener'` event *before* | |
@@ -229,7 +229,7 @@ changes: | |||
| 229 | 229 | now yields the original listener function. | |
| 230 | 230 | --> | |
| 231 | 231 | ||
| 232 | - * `eventName` {string|symbol} The event name | ||
| 232 | + * `eventName` {any} The event name | ||
| 233 | 233 | * `listener` {Function} The event handler function | |
| 234 | 234 | ||
| 235 | 235 | The `'removeListener'` event is emitted *after* the `listener` is removed. | |
@@ -296,13 +296,17 @@ Its `name` property is set to `'MaxListenersExceededWarning'`. | |||
| 296 | 296 | <!-- YAML | |
| 297 | 297 | added: v0.1.26 | |
| 298 | 298 | --> | |
| 299 | + - `eventName` {any} | ||
| 300 | + - `listener` {Function} | ||
| 299 | 301 | ||
| 300 | 302 | Alias for `emitter.on(eventName, listener)`. | |
| 301 | 303 | ||
| 302 | 304 | ### emitter.emit(eventName[, ...args]) | |
| 303 | 305 | <!-- YAML | |
| 304 | 306 | added: v0.1.26 | |
| 305 | 307 | --> | |
| 308 | + - `eventName` {any} | ||
| 309 | + - `...args` {any} | ||
| 306 | 310 | ||
| 307 | 311 | Synchronously calls each of the listeners registered for the event named | |
| 308 | 312 | `eventName`, in the order they were registered, passing the supplied arguments | |
@@ -345,7 +349,7 @@ set by [`emitter.setMaxListeners(n)`][] or defaults to | |||
| 345 | 349 | added: v3.2.0 | |
| 346 | 350 | --> | |
| 347 | 351 | ||
| 348 | - * `eventName` {string|symbol} The name of the event being listened for | ||
| 352 | + * `eventName` {any} The name of the event being listened for | ||
| 349 | 353 | ||
| 350 | 354 | Returns the number of listeners listening to the event named `eventName`. | |
| 351 | 355 | ||
@@ -358,6 +362,7 @@ changes: | |||
| 358 | 362 | description: For listeners attached using `.once()` this returns the | |
| 359 | 363 | original listeners instead of wrapper functions now. | |
| 360 | 364 | --> | |
| 365 | + - `eventName` {any} | ||
| 361 | 366 | ||
| 362 | 367 | Returns a copy of the array of listeners for the event named `eventName`. | |
| 363 | 368 | ||
@@ -374,7 +379,7 @@ console.log(util.inspect(server.listeners('connection'))); | |||
| 374 | 379 | added: v0.1.101 | |
| 375 | 380 | --> | |
| 376 | 381 | ||
| 377 | - * `eventName` {string|symbol} The name of the event. | ||
| 382 | + * `eventName` {any} The name of the event. | ||
| 378 | 383 | * `listener` {Function} The callback function | |
| 379 | 384 | ||
| 380 | 385 | Adds the `listener` function to the end of the listeners array for the | |
@@ -410,7 +415,7 @@ myEE.emit('foo'); | |||
| 410 | 415 | added: v0.3.0 | |
| 411 | 416 | --> | |
| 412 | 417 | ||
| 413 | - * `eventName` {string|symbol} The name of the event. | ||
| 418 | + * `eventName` {any} The name of the event. | ||
| 414 | 419 | * `listener` {Function} The callback function | |
| 415 | 420 | ||
| 416 | 421 | Adds a **one time** `listener` function for the event named `eventName`. The | |
@@ -443,7 +448,7 @@ myEE.emit('foo'); | |||
| 443 | 448 | added: v6.0.0 | |
| 444 | 449 | --> | |
| 445 | 450 | ||
| 446 | - * `eventName` {string|symbol} The name of the event. | ||
| 451 | + * `eventName` {any} The name of the event. | ||
| 447 | 452 | * `listener` {Function} The callback function | |
| 448 | 453 | ||
| 449 | 454 | Adds the `listener` function to the *beginning* of the listeners array for the | |
@@ -465,7 +470,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. | |||
| 465 | 470 | added: v6.0.0 | |
| 466 | 471 | --> | |
| 467 | 472 | ||
| 468 | - * `eventName` {string|symbol} The name of the event. | ||
| 473 | + * `eventName` {any} The name of the event. | ||
| 469 | 474 | * `listener` {Function} The callback function | |
| 470 | 475 | ||
| 471 | 476 | Adds a **one time** `listener` function for the event named `eventName` to the | |
@@ -484,6 +489,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. | |||
| 484 | 489 | <!-- YAML | |
| 485 | 490 | added: v0.1.26 | |
| 486 | 491 | --> | |
| 492 | + - `eventName` {any} | ||
| 487 | 493 | ||
| 488 | 494 | Removes all listeners, or those of the specified `eventName`. | |
| 489 | 495 | ||
@@ -497,6 +503,8 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. | |||
| 497 | 503 | <!-- YAML | |
| 498 | 504 | added: v0.1.26 | |
| 499 | 505 | --> | |
| 506 | + - `eventName` {any} | ||
| 507 | + - `listener` {Function} | ||
| 500 | 508 | ||
| 501 | 509 | Removes the specified `listener` from the listener array for the event named | |
| 502 | 510 | `eventName`. | |
@@ -564,6 +572,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. | |||
| 564 | 572 | <!-- YAML | |
| 565 | 573 | added: v0.3.5 | |
| 566 | 574 | --> | |
| 575 | + - `n` {integer} | ||
| 567 | 576 | ||
| 568 | 577 | By default EventEmitters will print a warning if more than `10` listeners are | |
| 569 | 578 | added for a particular event. This is a useful default that helps finding | |
| Back | FazBrowse Home | New Git URL |
0 commit comments