steveklabnik/frappuccino — pull request #22 by seadowg (2013-09-21 23:34:38+00:00)
Title: Add #until and #toggle to Property

These methods allow switching a `Property` based on some `Stream`. For instance if we had `a.until(stream, b)` the result would behave like `a` until the `stream` occurred. It would then behave like `b`. `a.toggle(stream, b)` is similar but the behaviour of the result Property will switch between the `a` and `b` on **every** occurrence of the stream (rather than just the first one).

Both are very useful for switches/buttons on a UI and allow for a pretty cool abstraction I think (a lot nicer than checking state on event handlers).