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.6 to 2.0.0

8

event-pubsub-browser.js

@@ -9,3 +9,3 @@ window.pubsub=(

}
checkScope.apply(this);

@@ -20,2 +20,6 @@

function unsub(type,handler){
if(!handler){
var err=new ReferenceError('handler not defined. if you wish to remove all handlers from the event please pass "*" as the handler');
throw err;
}
checkScope.apply(this);

@@ -40,3 +44,3 @@

if(!handler){
if(handler=='*'){
delete this._events_[type];

@@ -43,0 +47,0 @@ return;

@@ -16,2 +16,6 @@ function sub(type,handler){

function unsub(type,handler){
if(!handler){
var err=new ReferenceError('handler not defined. if you wish to remove all handlers from the event please pass "*" as the handler');
throw err;
}
checkScope.apply(this);

@@ -36,3 +40,3 @@

if(!handler){
if(handler=='*'){
delete this._events_[type];

@@ -39,0 +43,0 @@ return;

{
"name": "event-pubsub",
"version": "1.0.6",
"version": "2.0.0",
"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",

Event PubSub
============
npm info :
![event-pubsub npm version](https://img.shields.io/npm/v/event-pubsub.svg) ![total npm downloads for event-pubsub](https://img.shields.io/npm/dt/event-pubsub.svg) ![monthly npm downloads for event-pubsub](https://img.shields.io/npm/dm/event-pubsub.svg)
![event-pubsub npm version](https://img.shields.io/npm/v/event-pubsub.svg) ![total npm downloads for event-pubsub](https://img.shields.io/npm/dt/event-pubsub.svg) ![monthly npm downloads for event-pubsub](https://img.shields.io/npm/dm/event-pubsub.svg)
GitHub info :
![event-pubsub GitHub Release](https://img.shields.io/github/release/RIAEvangelist/event-pubsub.svg) ![GitHub license event-pubsub license](https://img.shields.io/github/license/RIAEvangelist/event-pubsub.svg) ![open issues for event-pubsub on GitHub](https://img.shields.io/github/issues/RIAEvangelist/event-pubsub.svg)
![event-pubsub GitHub Release](https://img.shields.io/github/release/RIAEvangelist/event-pubsub.svg) ![GitHub license event-pubsub license](https://img.shields.io/github/license/RIAEvangelist/event-pubsub.svg) ![open issues for event-pubsub on GitHub](https://img.shields.io/github/issues/RIAEvangelist/event-pubsub.svg)
Pubsub events for Node and the browser allowing event scoping and multiple scopes.
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!

@@ -44,3 +44,3 @@

);
events.on(

@@ -52,11 +52,11 @@ '*',

);
events.on(
'removeEvents',
function(){
events.off('*');
events.off('*','*');
console.log('Removed all events');
}
);
/************************************\

@@ -73,4 +73,4 @@ * trigger events for testing

);
#### Browser

@@ -101,3 +101,3 @@ ##### HTML

);
events.on(

@@ -109,11 +109,11 @@ '*',

);
events.on(
'removeEvents',
function(){
events.off('*');
events.off('*','*');
console.log('Removed all events');
}
);
/************************************\

@@ -126,5 +126,5 @@ * trigger events for testing

);
events.trigger(
'removeEvents'
);

Sorry, the diff of this file is not supported yet

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