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

dot-event

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-event

Powerful event emitter

  • 3.0.27
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
91
increased by4450%
Maintainers
1
Weekly downloads
 
Created
Source

dot-event

Javascript event emitter, foundation of everything.

neutron star

Buzzwords

Dot-event produces code that is:

  • Asynchronous
  • Debuggable
  • Decoupled
  • Extensible
  • Testable

Listening to events

var dot = require("dot-event")()

dot.any("someEvent", function(prop, arg, dot, event) {
  //    ^—— event    ^—— listener
})
  • The first listener argument (prop) is an Array.<String> of prop keys.
  • The second listener argument (arg) is any value.
  • The third listener argument (dot) is the dot-event instance.
  • The fourth listener argument (event) is the event String.

Emitting events

dot.someEvent("a.b.c", ["d", "e", "f"], { opt: true })
//  ^—— event ^—— prop ^—— prop         ^—— arg
  • The last argument (arg) may be any value.
  • All arguments up to the last form a dot-delimited prop identifier. Only String and Array.<String> arguments form the prop identifier.

Existing dot composers

LibraryDescriptionURL
argRun functions from CLI or webhttps://github.com/dot-event/arg
logLog functionshttps://github.com/dot-event/log2
storeImmutable storehttps://github.com/dot-event/store2

Keywords

FAQs

Package last updated on 30 Jan 2019

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