https://github.com/Gozala/reducers
Raw File
Tip revision: 4e743321440a426d44c6ce03c05339e73c4517a5 authored by Irakli Gozalishvili on 24 October 2012, 19:47:47 UTC
Version 0.1.2
Tip revision: 4e74332
channel.js
/* 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')

function channel() {
  /**
  Return a channel -- a sequence of events over time that may be reduced by
  one or more consumer functions.

  Channels are `signals` that have been transformed by `hub`, allowing them
  to be reduced more than once.
  **/
  return hub(signal())
}

module.exports = channel
back to top