listenercount

WebJar for listenercount

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

listenercount
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

listenercount
WebJar for listenercount
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/junosuarez/node-listenercount

Download listenercount

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/listenercount/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>listenercount</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/listenercount/
implementation 'org.webjars.npm:listenercount:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/listenercount/
implementation ("org.webjars.npm:listenercount:1.0.1")
'org.webjars.npm:listenercount:jar:1.0.1'
<dependency org="org.webjars.npm" name="listenercount" rev="1.0.1">
  <artifact name="listenercount" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='listenercount', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "listenercount" % "1.0.1"
[org.webjars.npm/listenercount "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

listenercount

backwards compatible version of builtin events.listenercount

js standard style

build status

A polyfill of Node.js 0.12+'s events.listenerCount function for Node.js 0.10. Uses the builtin if present, otherwise uses polyfill implementation.

usage

var listenerCount = require('listenercount')
var EventEmitter = require('events').EventEmitter

var ee = new EventEmitter()
ee.on('event', function () {})
listenerCount(ee, 'event') // => 1
listenerCount(ee, 'foo') // => 0

api

listenerCount(ee : EventEmitter, eventName : String) => Number

Returns the number of listeners for a given eventName on an EventEmitter.

installation

$ npm install listenercount

running the tests

From package root:

$ npm install
$ npm test

contributors

license

ISC. (c) MMXVI jden [email protected]. See LICENSE.md

Versions

Version
1.0.1