Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
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.
The npm package is-node-emitter receives a total of 297 weekly downloads. As such, is-node-emitter popularity was classified as not popular.
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.