Skip to content

Commit

Permalink
Define channel abstraction, which is hub(signal()).
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala committed Jul 23, 2012
1 parent 96c9a85 commit 703d670
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions channel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* vim:set ts=2 sw=2 sts=2 expandtab */
/*jshint asi: true undef: true es5: true node: true browser: true devel: true
forin: true latedef: false globalstrict: true */

'use strict';

var hub = require('./hub')
var signal = require('./signal'),
emit = signal.emit, close = signal.close

function channel() {
return hub(signal())
}
channel.enqueue = emit
channel.close = close

module.exports = channel

0 comments on commit 703d670

Please sign in to comment.