Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eenano

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eenano

A tiny pessimistic event emitter. Optimized for no listeners.

  • 1.0.0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eenano

NPM

It's an EventEmitter! Like the one provided by core, but it does a whole lot less!! And it should be faster when there is nothing to do.

This EventEmitter is optimized for no listeners on an event. It should be plenty fast if there are listeners, of course...

It doesn't do most of what the core EventEmitter library does. If you need features, just use core.

A list of things this doesn't do:

  • Remove listeners
  • once
  • Special case the error event
  • domains
  • and more! (less?)

var EENano = require("eenano")

var ee = EENano()
ee.on("msg", function (foo) {
  console.log(foo)
})
ee.emit("msg", "hi")
// hi

API

var ee = require("eenano")()

Create an event emitter instance.

.on(event, handler)

On event synchronously call handler()

.emit(event, message)

Call all handlers listening for event with handler(metadata)

.events()

List events that have any handlers

.listeners(event)

List handlers for a given event

LICENSE

MIT

Keywords

FAQs

Package last updated on 16 Aug 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc