DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
    • can-construct-super
    • can-define-stream
      • behaviors
        • stream
      • DefineMap.prototype
        • stream
      • DefineList.prototype
        • stream
    • can-fixture
    • can-fixture-socket
    • can-jquery
    • can-stache-converters
    • can-stream
    • can-vdom
    • can-view-import
    • can-zone
    • steal-stache
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Ecosystem
  • /
  • can-define-stream
  • /
  • stream
  • / On this page
    • stream

      function

      An alias to toStream.

      map.toStream("[.propName][ eventName]")

      Creates a stream for the property and/or event.

      map.toStream(".tasks.length") //-> stream of .task.length values
      map.toStream("tasks")         //-> stream of tasks events
      map.toStream(".tasks add")    //-> stream of add events on .tasks
      

      Parameters

      1. propName {String}:

        A property name to listen to value changes. These should always being with a ..

      2. eventName {String}:

        An event name to listen for and create a stream from the event argument. The event name doesn't start with a ..

      Returns

      {Stream}:

      An event stream.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.