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

🍀97b Pubsub system

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

🍀 Irish PubSub - 97b pubsub system


gzip size brotli size install size

1

Modern (es6) functional Pubsub system (no class, or this), weights about 97b 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 unsubscribe = subscribe('The Dreadnoughts', (val) => console.log('The Dreadnoughts: ', val)) // returns unsubscribe method
send('Dreadnoughts', 'Best band ever') // => The Dreadnoughts: Best band ever
unsubscribe() // => true

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