Skip to content

Commit

Permalink
v2.3.0. Split from bal-util.
Browse files Browse the repository at this point in the history
- v2.3.0 July 12, 2013
	- Split out from [bal-util](https://github.com/balupton/bal-util)
	- Added support for splat arguments
  • Loading branch information
balupton committed Jul 12, 2013
1 parent 3e16f6c commit 2166413
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion History.md
@@ -1,7 +1,8 @@
## History

- v2.3.0 July 12, 2013
- Split out `balUtilEvents.EventEmitterEnhanced` into [event-emitter-grouped](https://github.com/bevry/event-emitter-grouped)
- Split out from [bal-util](https://github.com/balupton/bal-util)
- Added support for splat arguments

- v2.2.0 June 24, 2013
- Split out `balUtilModules` into [safeps](https://github.com/bevry/safeps)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -75,6 +75,7 @@ hello in parallel finished
*/
```


### EventEmitterGrouped, extends [events.EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)

- `getListenerGroup(eventName, args..., next?)` - returns a [TaskGroup](https://github.com/bevry/taskgroup#files) where each listener is a task, ordered by the highest priority listeners first
Expand All @@ -86,6 +87,7 @@ hello in parallel finished
- `emitParallel(eventName, args..., next?)` - fetch the listener group and execute it in parallel



## History
[You can discover the history inside the `History.md` file](https://github.com/bevry/event-emitter-grouped/blob/master/History.md#files)

Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -11,8 +11,7 @@
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)",
"Johny Jose <johny@playlyfe.com>"
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"bugs": {
"url": "https://github.com/bevry/event-emitter-grouped/issues"
Expand Down
Expand Up @@ -2,7 +2,6 @@
EventEmitter = require('events').EventEmitter
ambi = require('ambi')
{TaskGroup} = require('taskgroup')
{extractOptsAndCallback} = require('extract-opts')

# Group
# Allows you to emit events in serial or parallel
Expand All @@ -11,7 +10,7 @@ class EventEmitterGrouped extends EventEmitter
# Get Listener Group
# Fetch the listeners for a particular event as a task group
# next(err,results)
getListenerGroup: (eventName,opts...,next) ->
getListenerGroup: (eventName,args...,next) ->
# Get listeners
me = @
listeners = @listeners(eventName)
Expand All @@ -37,7 +36,7 @@ class EventEmitterGrouped extends EventEmitter
# Bind to the task
tasks.addTask (complete) ->
# Fire the listener, treating the callback as optional
ambi(listener, opts..., complete)
ambi(listener, args..., complete)

# Return
return tasks
Expand Down
File renamed without changes.

0 comments on commit 2166413

Please sign in to comment.