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

eventify

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventify - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

26

lib/eventify.js

@@ -61,4 +61,6 @@ // Eventify

}
var args = (arguments.length === 1 ?
[arguments[0]] : Array.apply(null, arguments));
ran = true;
memo = func.apply(this, arguments);
memo = func.apply(this, args);
func = null;

@@ -125,3 +127,5 @@ return memo;

self.off(name, onceListener);
callback.apply(this, arguments);
var args = (arguments.length === 1 ?
[arguments[0]] : Array.apply(null, arguments));
callback.apply(this, args);
});

@@ -177,9 +181,15 @@

// receive the true name of the event as the first argument).
trigger: function (name) {
trigger: function () {
if (!this._events) {
return this;
}
var events, allEvents,
args = slice.call(arguments, 1);
if (!eventsApi(this, 'trigger', name, args)) {
// #6 arguments should not be leaked in order to allow V8 optimizations.
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
var args = (arguments.length === 1 ?
[arguments[0]] : Array.apply(null, arguments));
var events, allEvents;
var name = args[0];
var extraArgs = args.slice(1);
if (!eventsApi(this, 'trigger', name, extraArgs)) {
return this;

@@ -190,6 +200,6 @@ }

if (events) {
triggerEvents(events, args);
triggerEvents(events, extraArgs);
}
if (allEvents) {
triggerEvents(allEvents, arguments);
triggerEvents(allEvents, args);
}

@@ -196,0 +206,0 @@ return this;

{
"name": "eventify",
"version": "2.0.0",
"version": "2.0.1",
"description": "Lightweight module that can be mixed in to any object in order to provide it with custom events. For node.js and the browser. Based on Backbone.Events",

@@ -57,3 +57,3 @@ "author": "Bermi Ferrer <bermi@bermilabs.com>",

"browsers": [
"iexplore/7..latest",
"iexplore/8..latest",
"firefox/17..latest",

@@ -60,0 +60,0 @@ "chrome/30..latest",

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