rx - Library for composing asynchronous and event-based operations in JavaScript
Applications, especially on the web have changed over the years from being a simple static page, to DHTML with animations, to the Ajax revolution. Each time, we're adding more complexity, more data, and asynchronous behavior to our applications. How do we manage it all? How do we scale it? By moving towards "Reactive Architectures" which are event-driven, resilient and responsive. With the Reactive Extensions, you have all the tools you need to help build these systems.
$ sbt clean publish-local
import io.scalajs.npm.rx._
Rx.Observable.range(0, 5).filterWith(_ % 2 == 0).drainFuture map { values =>
println(s"output: $values") //=> 0, 2, 4
}
To add the Rx
binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "rx" % "0.5.0"
Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")