Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

event-emitter-mod

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-emitter-mod

A Moddable SDK/XS compatible Event Emitter utility.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Event Emitter Mod

This is an event emitter utility lib for working in the Moddable SDK. This implements a low brow solution that should work for small event driven applications.

Installation

git clone https://github.com/dashcraft/event-emitter-mod.git or git clone git@github.com:dashcraft/event-emitter-mod.git cd event-emitter-mod && yarn install yarn build

Copy the /event-emitter-mod folder into your moddable sdk project, then add the event-emitter-mod package to your projects manifest.json includes:

"./event-emitter-mod/manifest.json"

Usage

First import the primary package import EventEmitter from 'event-emitter-mod' Afterwards, globally or internally you can create a new event emitter...

let eventEmitter = new EventEmitter()
eventEmitter.addListener('test', function someCallback(data) {
    trace('data', data)
})

// then you can call...
eventEmitter.emit('test', "Hello world")

// expect a console.log of
"Hello world"

Todo

  • Tests, tests, more tests
  • Test memory consumption
  • Double check with moddable best practices

Keywords

FAQs

Package last updated on 08 Jun 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc