New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ngraph.events

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngraph.events - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

5

index.js

@@ -64,3 +64,6 @@ module.exports = function(subject) {

var callbacks = registeredEvents[eventName];
var fireArguments = Array.prototype.splice.call(arguments, 1);
var fireArguments;
if (arguments.length > 1) {
fireArguments = Array.prototype.splice.call(arguments, 1);
}
for(var i = 0; i < callbacks.length; ++i) {

@@ -67,0 +70,0 @@ var callbackInfo = callbacks[i];

2

package.json
{
"name": "ngraph.events",
"version": "0.0.1",
"version": "0.0.2",
"description": "Basic events supoort for ngraph.js ",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,3 +7,2 @@ ngraph.events

[![build status](https://secure.travis-ci.org/anvaka/ngraph.events.png)](http://travis-ci.org/anvaka/ngraph.events)
Example

@@ -19,6 +18,6 @@ =======

// now any object can listen to events from your object
yourObject.on('beep', function(name) { console.log("Hello " + name); });
yourObject.on('beep', function(name) { console.log('Hello ' + name); });
// and you can fire events from your object:
yourObject.fire('beep', "World!"); // prints "Hello World!"
yourObject.fire('beep', 'World!'); // prints 'Hello World!'

@@ -51,2 +50,6 @@ // stop listen to events:

Why?
===
This module is a part of larger experiment which I'm currently working on. ```EventEmitter``` seemed to be pretty heavyweighted for my needs, so I rolled out this tiny library :).
install

@@ -53,0 +56,0 @@ =======

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