Socket
Socket
Sign inDemoInstall

onedionys-event-emitter

Package Overview
Dependencies
133
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    onedionys-event-emitter

One Dionys (Event Emitter) - Packages to implement the Observer pattern, enabling communication between application components.


Version published
Weekly downloads
2
decreased by-88.89%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Welcome to One Dionys - Event Emitter! 👋

Packages to implement the Observer pattern, enabling communication between application components. 💖

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax
// Import EventEmitter from the package
const EventEmitter = require('./src/EventEmitter');

// Create an instance of EventEmitter
const emitter = new EventEmitter();

// Define a listener function
const listener = (data) => {
  console.log('Event triggered with data:', data);
};

// Register the listener for the 'customEvent' event
emitter.on('customEvent', listener);

// Emit the 'customEvent' event with some data
emitter.emit('customEvent', 'Hello, World!');

// Remove the listener for the 'customEvent' event
emitter.off('customEvent', listener);
Explanation
  • The "Event Emitter" package has three main methods: on, emit, and off.
  • The on method is used to add a listener to an event.
  • The emit method is used to emit an event with optional parameters.
  • The off method is used to remove the listener from an event.
Return Value
  • The on and off methods do not return a specific value.
  • The emit method does not return a value and is only used to trigger the event.

📆 Release Date

  • v1.0.0 : 07 March 2024
  • v1.0.1 : 11 March 2024
  • v4.0.0 : 11 March 2024
  • v4.0.1 : 11 March 2024
  • v4.0.2 : 13 March 2024
  • v4.0.3 : 18 March 2024
  • v5.0.0 : 31 March 2024

🧑 Author

  • Facebook : Oned Ionys
  • Instagram : @onedionys
  • Twitter : @onedionys
  • LinkedIn : @onedionys

📝 License

  • Copyright © 2024 One Dionys
  • One Dionys - Event Emitter is an open source project licensed under the MIT license

☕️ Suppport & Donation

Love One Dionys - Event Emitter? Support this project by donating or sharing with others in need.

Made with ❤️ One Dionys

Keywords

FAQs

Last updated on 31 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc