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

bal-util

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bal-util - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

78

out/lib/events.js
// Generated by CoffeeScript 1.6.3
var Event, EventEmitter, EventEmitterEnhanced, EventSystem, TaskGroup, ambi, typeChecker, _ref, _ref1,
var Event, EventEmitter, EventSystem, typeChecker, _ref,
__hasProp = {}.hasOwnProperty,

@@ -9,73 +9,4 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

ambi = require('ambi');
TaskGroup = require('taskgroup').TaskGroup;
typeChecker = require('typechecker');
EventEmitterEnhanced = (function(_super) {
__extends(EventEmitterEnhanced, _super);
function EventEmitterEnhanced() {
_ref = EventEmitterEnhanced.__super__.constructor.apply(this, arguments);
return _ref;
}
EventEmitterEnhanced.prototype.getListenerGroup = function(eventName, data, next) {
var listeners, me, tasks;
me = this;
listeners = this.listeners(eventName);
tasks = new TaskGroup().once('complete', next);
listeners.sort(function(a, b) {
return (b.priority || 0) - (a.priority || 0);
});
listeners.forEach(function(listener) {
if (listener.listener) {
listener = [listener.bind(me), listener.listener];
} else {
listener = listener.bind(me);
}
return tasks.addTask(function(complete) {
return ambi(listener, data, complete);
});
});
return tasks;
};
EventEmitterEnhanced.prototype.off = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.removeListener.apply(this, args);
};
EventEmitterEnhanced.prototype.emitSync = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.emitSerial.apply(this, args);
};
EventEmitterEnhanced.prototype.emitSerial = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.getListenerGroup.apply(this, args).run();
};
EventEmitterEnhanced.prototype.emitAsync = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.emitParallel.apply(this, args);
};
EventEmitterEnhanced.prototype.emitParallel = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.getListenerGroup.apply(this, args).setConfig({
concurrency: 0
}).run();
};
return EventEmitterEnhanced;
})(EventEmitter);
Event = (function() {

@@ -100,4 +31,4 @@ Event.prototype.name = null;

function EventSystem() {
_ref1 = EventSystem.__super__.constructor.apply(this, arguments);
return _ref1;
_ref = EventSystem.__super__.constructor.apply(this, arguments);
return _ref;
}

@@ -301,8 +232,7 @@

})(EventEmitterEnhanced);
})(EventEmitter);
module.exports = {
EventEmitterEnhanced: EventEmitterEnhanced,
Event: Event,
EventSystem: EventSystem
};

2

package.json
{
"name": "bal-util",
"version": "2.2.0",
"version": "2.3.0",
"description": "Common utility functions for Node.js used and maintained by Benjamin Lupton",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/balupton/bal-util",

@@ -34,2 +34,3 @@ # Benjamin Lupton's Utility Functions

- [eachr](https://github.com/bevry/eachr) < `balUtilFlow.each`
- [event-emitter-grouped](https://github.com/bevry/event-emitter-grouped) < `balUtilEvents.EventEmitterEnhanced`
- [extendr](https://github.com/bevry/extendr) < `balUtilFlow.(extend|clone|etc)`

@@ -41,4 +42,4 @@ - [extract-opts](https://github.com/bevry/extract-opts) < `balUtilFlow.extractOptsAndCallback`

- [safeps](https://github.com/bevry/safeps) < `balUtilModules`
- [TaskGroup](https://github.com/bevry/taskgroup) < `balUtilFlow.Group`
- [typeChecker](https://github.com/bevry/typechecker) < `balUtilTypes`
- [taskgroup](https://github.com/bevry/taskgroup) < `balUtilFlow.Group`
- [typechecker](https://github.com/bevry/typechecker) < `balUtilTypes`

@@ -45,0 +46,0 @@

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