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

event-pubsub

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-pubsub - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "event-pubsub",
"version": "1.0.1",
"version": "1.0.2",
"description": "Pubsub events for Node and the browser allowing event scoping and multiple scopes. Easy for any developer level. No frills, just high speed pubsub events!",

@@ -5,0 +5,0 @@ "main": "event-pubsub.js",

@@ -1,4 +0,61 @@

event-pubsub
Event PubSub
============
Event Pubsub for Javascript will work in node js or browser
Pubsub events for Node and the browser allowing event scoping and multiple scopes.
Easy for any developer level. No frills, just high speed pubsub events!
---
### Basic Examples
---
#### Node
var events = new require('../../event-pubsub.js')();
events.on(
'hello',
function(data){
console.log('hello event recieved ', data);
}
);
events.on(
'*',
function(type){
console.log('Catch all detected event type of : ',type, '. List of all the sent arguments ',arguments);
}
);
/************************************\
* trigger events for testing
* **********************************/
events.trigger(
'hello',
'world'
);
#### Browser
##### HTML
var events = new require('../../event-pubsub.js')();
events.on(
'hello',
function(data){
console.log('hello event recieved ', data);
}
);
events.on(
'*',
function(type){
console.log('Catch all detected event type of : ',type, '. List of all the sent arguments ',arguments);
}
);
/************************************\
* trigger events for testing
* **********************************/
events.trigger(
'hello',
'world'
);
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