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

🍀146b Pubsub system

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

🍀 Irish PubSub - 133b pubsub system


gzip size install size

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

Install

yarn add irish-pub-sub

or with UMD

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

Usage

import pubsub from 'irish-pub-sub'

const [subscribe, emit] = 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 20 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