npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@guing/event-bus

v0.0.1

Published

This is a simple and powerful TypeScript event bus for managing events and listeners

Downloads

2

Readme

TypeScript Event Bus

TypeScript Event Bus is a simple yet powerful event bus for TypeScript applications. It can be used to distribute events and manage event listeners, making it easy to add, remove, and trigger events in your application.

Features

  • Strong typing and compile-time checks
  • Easy to add, remove, and trigger events
  • Simplifies event-driven code
  • Makes your application easier to maintain and read
  • Designed specifically for TypeScript applications

Installation

To install TypeScript Event Bus, use the following command:

npm install event-bus-ts

Usage

To use TypeScript Event Bus in your TypeScript project, first import the EventBus class:

import EventBus from '@myorg/simple-event-bus'

Then, create a new instance of the EventBus class:

const eventBus = new EventBus<MyEventData>()

You can replace MyEventData with the type of data you want to pass to your event listeners.

To listen for an event, use the on method:

eventBus.on('my-event', (data: MyEventData) => {
  console.log('My event data:', data)
})

To trigger an event, use the emit method:

eventBus.emit('my-event', { foo: 'bar' })

To remove an event listener, use the off method:

eventBus.off('my-event', myEventListener)

To remove all event listeners for a specific event, use the off method with only the event name:

eventBus.off('my-event')

To remove all event listeners for all events, use the offAll method:

eventBus.offAll()

API

The EventBus class has the following public methods:

  • on(event: string, func: Func<T>): void - adds an event listener for the specified event
  • emit(event: string, data: T): void - triggers the specified event with the specified data
  • off(event: string, func?: Func<T>): void- removes the specified event listener, or all listeners for the specified event if func is not specified
  • once(event: string, func: Func<T>): void- adds a one-time event listener for the specified event
  • offAll(): void- removes all event listeners for all events

License

TypeScript Event Bus is licensed under the MIT license. See the LICENSE file for more information.