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

irish-pub-sub

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

irish-pub-sub

🍀131b Pubsub system

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

🍀 Irish PubSub - 131b pubsub system


gzip size install size

Modern (es6) functional Pubsub system (no class, or this), weights about 131b minified + gzipped.

Install

yarn add irish-pub-sub

or with UMD

<script scr="https://unpkg.com/irish-pub-sub/dist/index.umd.js"></script>

Usage

import pubsub from 'irish-pub-sub'

const [subscribe, send] = pubsub()

const unsbuscribe = subscribe('The Dreadnoughts', (val) => console.log('The Dreadnoughts: ', val)) // returns unsubscribe method
send('Dreadnoughts', 'Best band ever') // => The Dreadnoughts: Best band ever

Inspired by developit/mitt

Don't use it in production 😅

FAQs

Package last updated on 09 Jul 2020

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