Catalog npm
Back to packageRELEASE DETAILS

0.0.9

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-TVUKnB/0af9/iXOzCO5HOIYo/7/2Ev0EW5nDs/abQwM7qLpBR0oZaw2/nTNkL4lCbMrDSceEltZ64IeRRqbQnA==",
  "shasum": "0614a435e851f0314cc3a2a44cceb44ad74b8a27",
  "tarball": "https://registry.npmjs.org/7pmlabs-event-bus/-/7pmlabs-event-bus-0.0.9.tgz",
  "fileCount": 8,
  "unpackedSize": 5878,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQCx1CczL0bNAdeYiLnPu77rCrI0YxXzFq157BD01IyC+QIhAPnm/72xQUA0mqjoH3mODkRu5xYYxfCaoWCg7PGzPj+7"
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJji4MMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkcQ//UNBXew/t63a7DIOodW60DTNWXf2r0eu5fYqjMAk2xCGiTLQC\r\nBwCp7rz3w3yr+DOUi/NZhJ3A0FbuFqYY8kqoFkqqynwdIp6WcKoFK6idxJtj\r\nOxg4tm865VSWIneZEASeYvUC5ZTl5toRlwFncyOe2qWEil0kYTtbDlyN52Xs\r\nva085aasfAFIuKjGQoy1ywQ4SRvPzopitlGWXknGY8frUyjRGGH0a1hGKSgN\r\nZ+DYAYSc1ipJbi3sBjyCCSaJOSOc2v1Xqh1PRHuiiUX+qqqLHSp85/X9sopO\r\nDGih7a7m0Q5XSR5H9ovTw7439jaJ+LGR+FCaRVUVGYMT+mnhbWnsNJCLKWgp\r\nojrqw293JwYbk7Ajgn85OwtS7pfWgooKapPQpAHuvrjkqhlMKihrA3MrvDTT\r\nVxI+TpZMAQG4I8WJVx+35jL1At3oWPiGy8ssUnDBbU+B2txJcsEOPR8Y4Fr2\r\nn2M3+Sw61a4DOUX8xHEDbpVfIuR7I98Y9TLBR0VVImjiSM7sDDqpxlsiZio/\r\nGLp1Z2WH2QOuNtTHs0f3kfvO+4kURLyWJSy6OdqLJr3ONJ3kAAVgq0Ye6aVV\r\nl5cxXrPtqKHuU6kwP2+MF2R62ZkcqhOIFps79mAKnuN/1epPWCh01A7t8VB3\r\nTK5U7kqJLDE5uXsyP1V8+7gVFJJoUXmoMyI=\r\n=TT/T\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:343a02ed2933d50374a94a40abcc83b4ffac9de4fac1a4b8fb96ecf17f84bd90

Other collected versions

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