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

pubst

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pubst

A slightly opinionated pub/sub event emitter for JavaScript.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-94.12%
Maintainers
1
Weekly downloads
 
Created
Source

Pubst

Build Status

I suggest that you DO NOT use this for anything terribly serious just yet. I'm still kind of feeling it out myself.

This is yet another basic asynchronous pub/sub implementation in JavaScript. I almost used PubSubJS, but there are a few features I wanted that it doesn't support. I may try and add those in so I don't need to maintain this lib ;-). The features I wanted in a pub/sub lib (in order of importance) are:

  • Prime subscribers with latest payload even if it occurred before the subscription.
  • Allow subscribers to define default payloads to be sent in the event of an empty or null publish.
  • Warnings when publishing to a topic that has no subscribers.

TODO (In no particular order)

  • Use this in a few things to feel out the API.
  • If I'm going to continue to use this implementation, I should probably write actual documentation.

Keywords

FAQs

Package last updated on 09 Mar 2018

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