event-pubsub
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"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' | ||
); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19084
62