Catalog npm
Back to packageRELEASE DETAILS

0.0.8

npm

7pmlabs-event-bus

Lightweight native event bus in Typescipt.

Published3 Dec 2022
Direct dependencies4
Transitive dependenciesNot calculated

README

Current package documentation

7pmlabs-event-bus

Lightweight native event bus in Typescipt.

Getting started

npm i 7pmlabs-event-bus

Usage

import { EventBus } from '7pmlabs-event-bus';

Event bus instance is signleton but you can give it a different name if you want to have more than one instance:

const eventBus = EventBus.getInstance();

Listen to a specific event:

eventBus.on('MY-CUSTOM-EVENT', (e) => {});

Listen only one time to a specific event:

eventBus.once('MY-CUSTOM-EVENT', (e) => {});

Emit an event:

eventBus.emit('MY-CUSTOM-EVENT', 'Hello world!');

Remove listener for a specific event:

eventBus.off('MY-CUSTOM-EVENT', (e) => {});

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^18.11.10development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.6.4development
vite
Environment
{
  "local_name": "vite",
  "alias": false,
  "peer_metadata": null
}
^3.2.3development
vite-plugin-dts
Environment
{
  "local_name": "vite-plugin-dts",
  "alias": false,
  "peer_metadata": null
}
^1.7.1development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-kfkz09YrzWvm4jE3bBKWBMBdrMqnRCFnV8/7Fj1aexlY1paUjwV+AVXlX9pLGygXMj0+thH692dWZOqmGYCSRw==",
  "shasum": "3d1d3072fd0ae6d06ae2cc05b240bd0f1ca4bf6c",
  "tarball": "https://registry.npmjs.org/7pmlabs-event-bus/-/7pmlabs-event-bus-0.0.8.tgz",
  "fileCount": 8,
  "unpackedSize": 5877,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIFFA3sHQDe/04wJxPBgotUCLdMx828khhIn/2Yjnz9ojAiAnjEps5I87MMJ5rmhCedCPM2XzkuaXZi/v8kXDjKIU1w=="
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJji4EbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1yQ//UlWEci23A5XAVBDHsLv+d6Zm6I7SrH2+XA8vEsz9ozxQqdR+\r\nQSfZhzOaIL7HeisfxHnSRmiOrEUaoJ0mD2UQnfULlQWdXe20c8UTuNl02qE9\r\nMSDhCCRgn2faI8CZ51v7du94oaPVyjG30YHO+XNCbrF4Ae1uA7q5l3/qkVKd\r\nVcU4vbIIu7r4pCMgZJ2b1eoHK+Bp1jzQpIxUMZhtTWANuwO6U1VHHKleNJf9\r\nbDfig/71I1tvEgnmoPxst4Q8coRxTSZU6iKXplOT+d0pkr//j9N89QJqne00\r\nko3bfG75uRFRLno5qqoWndVpIB/whytmq1deNWso4SC1k9g3HWTcB6Jk0/5e\r\ng1dHsgdSXV6vtgYPiME3Xjb6xyonNNpWdY/CnojM1Y6icZpyglEU39zPMf33\r\nX/Kygz5Z29LNRYW4EoLtW75CwsFdQfIksPfCElfi5I80Z+Ia8j5vN6/xEFuH\r\ncfbJI32trNxZKWeKFt5jqKrH3MinzzmOyHnkZGToqT7Pog+wpESAUctOkiBT\r\nDZk7W1MZK+QTwVdllC6YKD1uEgqweiJjYezKmYo3g0WgFJjwBz+T22X7d5P8\r\n6xFAFT/7vhA0b+x8tG/gW5vlr2hZC80qII/z9oNriGxiGcUWulWHhnU3r5fE\r\nF9NBZFvy93mr5VbmDFkBFRyHc9G3a28djz8=\r\n=3VWf\r\n-----END PGP SIGNATURE-----\r\n"
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:17ece9fbb74ada0d8648989f2b1b326dfddd9c8e76e361454e1554522253f36f

Other collected versions

0.0.1116 Nov0.0.1016 Nov0.0.93 Dec0.0.73 Dec0.0.63 Dec0.0.53 DecView all collected versions →