Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
338 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /*!
|
---|
| 2 | * depd
|
---|
| 3 | * Copyright(c) 2015 Douglas Christopher Wilson
|
---|
| 4 | * MIT Licensed
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | 'use strict'
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * Module exports.
|
---|
| 11 | * @public
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | module.exports = eventListenerCount
|
---|
| 15 |
|
---|
| 16 | /**
|
---|
| 17 | * Get the count of listeners on an event emitter of a specific type.
|
---|
| 18 | */
|
---|
| 19 |
|
---|
| 20 | function eventListenerCount (emitter, type) {
|
---|
| 21 | return emitter.listeners(type).length
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.