Catalog npm
Back to packageRELEASE DETAILS

0.0.2

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-5BNav2icxe8tEc2+z7OZ+H415JIWO6M3NCCRrZEQ2lAFD9gF+5jdZkIzoh/VLDCGJsHCbIQklimvLWkldtG5Dg==",
  "shasum": "c27ad2765d01e702301c5919bf0d228fd37b4749",
  "tarball": "https://registry.npmjs.org/7pmlabs-event-bus/-/7pmlabs-event-bus-0.0.2.tgz",
  "fileCount": 8,
  "unpackedSize": 5191,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQCJVPTJeN6KsDJe00AlynVcGyFzN1ZSnLpkm8TcFfEkPwIhAO//1Y/aDBGTfjwG+2OR4+6e1kJ/P4eMNSDoK1gdf7oP"
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJji3VpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquLw/9HKCLRuhEFAirElIGsFr93n5OYD+s2IP2nhM1KOQpCveRtOku\r\ncfrAt6AhsHkSxwBiSTJiwrY/SboeeulWOWE+Mn1G48xjNx2HMy/pUvMuDMFl\r\nPl3ayyjcaioAmXxmpGdKJl7kLHzGpSQYyDWPinFv+F3meN8R74kHE/AQdLE2\r\n1HLNGrIsoJKrVP0KM48g4DP95F2hB22cLh6+rEhEDB36JHCkp4nBoIaeJMVI\r\nFdgmmTPyH3MnrNU4rHDjwvTFShL0h1Bv2C3dh8AY9XOEtNXcoBIht0u4oTuo\r\nfB2k5VRus25Klhl//02mVzqjBrtHEUjnvzKjSCmYuJuuzJncDErkYQNu7e4O\r\nlPJZO4aKNTFoTRns/0WrmIPD5rp+AmRf5S7hJ3tEdSbbVhdhHfdI5gmTv8CO\r\nEItTL5i7VMW4B+hwzAs5qEabPvo/tAQHjOLLCmGKyK5tTw5KbmTxAql6CYQi\r\nksf70MC8nyQuzF8c0zDT9EYkY2e1MdZWjY/1g0Wdccx5TED3LR8dax2+CKII\r\nULbG6hEmrf0B7vPHz8kLWrbiVkVDRk67F9/M70f9xBnTaZKxUrbfSzA1hsvL\r\n2KBATf4Hc8x81ghEL5JxSlWuK9bDRLrzCosm2Ebna7qB0Q5uyuMgL5V99dTP\r\nofNIxJF3hhYSuMlpwHXWoOtmqcI+C5BDY5I=\r\n=r0Ev\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:4f3b134bdf48ee953d45b7fa7e21f36c09a23f3496efd4b64e06c4eb1bc4a4ab

Other collected versions

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