Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
is-node-emitter
Advanced tools
Changelog
1.0.6 - 2016-04-14
Readme
Strictly checks that given value is nodejs EventEmitter or something like it. It's easy, because his API is in frozen state.
npm i is-node-emitter --save
For more use-cases see the tests
var isNodeEmitter = require('is-node-emitter')
// emitters
var Emitter = require('events').EventEmitter
var DualEmitter = require('dual-emitter')
var ChildProcess = require('child_process')
var EventEmitter2 = require('eventemitter2').EventEmitter2
var EventEmitter3 = require('eventemitter3')
var ComponentEmitter = require('component-emitter')
// from iojs 2.x
var ChildProcessCtor = require('child_process').ChildProcess
true
var fs = require('fs')
isNodeEmitter(fs.createReadStream('./index'))
isNodeEmitter(new Emitter())
isNodeEmitter(new EventEmitter2({wildcard: false}))
isNodeEmitter(new ChildProcessCtor())
isNodeEmitter(ChildProcess.spawn('echo', ['hello']))
isNodeEmitter(ChildProcess.exec('echo hello'))
false
isNodeEmitter(DualEmitter())
isNodeEmitter(ComponentEmitter())
isNodeEmitter(new DualEmitter())
isNodeEmitter(new ComponentEmitter())
isNodeEmitter(new EventEmitter3())
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.
FAQs
Strictly checks that given value is nodejs EventEmitter. It's easy, because his API is in frozen state.
We found that is-node-emitter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).