Catalog npm
Back to packageRELEASE DETAILS

0.0.10

npm

7pmlabs-event-bus

Lightweight native event bus in Typescipt.

Published16 Nov 2023
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-mL+NM6RopAelD/9IjFFOVUzOYD/SK25bXm++pVkukPhi1s1zRmgz50PBeps4sMUqokp6BKdp5/CwjfGsgfr/PQ==",
  "shasum": "db47bb9da4a456aae1558b2091e3d06c678ab3df",
  "tarball": "https://registry.npmjs.org/7pmlabs-event-bus/-/7pmlabs-event-bus-0.0.10.tgz",
  "fileCount": 7,
  "unpackedSize": 4382,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQC27yduqSy2ktBCUCdXH3OlNtKHeElIe0O7qD/a2E8h+AIgSfzMVK1V2bn3pM/qpnCoJZooBWTY2vzBm/QwoM7myms="
    }
  ]
}

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:4d2de43ab5a593511299d40f6516697bc9b25dfeb0d4f1ebc28f40ee81b2e1bd

Other collected versions

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