Skip to content

Commit

Permalink
Merge 3ad5119 into 6279d6b
Browse files Browse the repository at this point in the history
  • Loading branch information
staltz committed Feb 26, 2016
2 parents 6279d6b + 3ad5119 commit 97aa4f5
Show file tree
Hide file tree
Showing 14 changed files with 846 additions and 96 deletions.
Binary file added doc/asset/Rx_Logo_S.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 9 additions & 94 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,12 @@
# Observable
<h1 class="rx-title"><img src="./manual/asset/Rx_Logo_S.png">RxJS</h1>

## creation functions
**The ReactiveX library for JavaScript.**

- [combineLatest](function/index.html#static-function-combineLatest)
- [concat](function/index.html#static-function-concat)
- [create](function/index.html#static-function-create)
- [defer](function/index.html#static-function-defer)
- [empty](function/index.html#static-function-empty)
- [forkJoin](function/index.html#static-function-forkJoin)
- [from](function/index.html#static-function-from)
- [fromArray](function/index.html#static-function-fromArray)
- [fromEvent](function/index.html#static-function-fromEvent)
- [fromEventPattern](function/index.html#static-function-fromEventPattern)
- [fromPromise](function/index.html#static-function-fromPromise)
- [interval](function/index.html#static-function-interval)
- [merge](function/index.html#static-function-merge)
- [never](function/index.html#static-function-never)
- [of](function/index.html#static-function-of)
- [race](function/index.html#static-function-race)
- [range](function/index.html#static-function-range)
- [throw](function/index.html#static-function-throw)
- [timer](function/index.html#static-function-timer)
- [zip](function/index.html#static-function-zip)
This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is intended to supersede it once this is ready. This version's purpose is to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.

## operators

- [buffer](function/index.html#static-function-buffer)
- [bufferCount](function/index.html#static-function-bufferCount)
- [bufferTime](function/index.html#static-function-bufferTime)
- [bufferToggle](function/index.html#static-function-bufferToggle)
- [bufferWhen](function/index.html#static-function-bufferWhen)
- [catch](function/index.html#static-function-catch)
- [combineAll](function/index.html#static-function-combineAll)
- [combineLatest](function/index.html#static-function-combineLatest)
- [concat](function/index.html#static-function-concat)
- [concatAll](function/index.html#static-function-concatAll)
- [concatMap](function/index.html#static-function-concatMap)
- [concatMapTo](function/index.html#static-function-concatMapTo)
- [count](function/index.html#static-function-count)
- [debounce](function/index.html#static-function-debounce)
- [defaultIfEmpty](function/index.html#static-function-defaultIfEmpty)
- [delay](function/index.html#static-function-delay)
- [distinct](function/index.html#static-function-distinct)
- [distinctKey](function/index.html#static-function-distinctKey)
- [distinctUntilChanged](function/index.html#static-function-distinctUntilChanged)
- [distinctUntilKeyChanged](function/index.html#static-function-distinctUntilKeyChanged)
- [do](function/index.html#static-function-do)
- [expand](function/index.html#static-function-expand)
- [filter](function/index.html#static-function-filter)
- [finally](function/index.html#static-function-finally)
- [mergeMap](function/index.html#static-function-mergeMap)
- [mergeMapTo](function/index.html#static-function-mergeMapTo)
- [groupBy](function/index.html#static-function-groupBy)
- [lift](function/index.html#static-function-lift)
- [map](function/index.html#static-function-map)
- [mapTo](function/index.html#static-function-mapTo)
- [materialize](function/index.html#static-function-materialize)
- [merge](function/index.html#static-function-merge)
- [mergeAll](function/index.html#static-function-mergeAll)
- [multicast](function/index.html#static-function-multicast)
- [observeOn](function/index.html#static-function-observeOn)
- [pairwise](function/index.html#static-function-pairwise)
- [partition](function/index.html#static-function-partition)
- [publish](function/index.html#static-function-publish)
- [publishBehavior](function/index.html#static-function-publishBehavior)
- [publishReplay](function/index.html#static-function-publishReplay)
- [race](function/index.html#static-function-race)
- [reduce](function/index.html#static-function-reduce)
- [repeat](function/index.html#static-function-repeat)
- [retry](function/index.html#static-function-retry)
- [retryWhen](function/index.html#static-function-retryWhen)
- [sample](function/index.html#static-function-sample)
- [sampleTime](function/index.html#static-function-sampleTime)
- [scan](function/index.html#static-function-scan)
- [skip](function/index.html#static-function-skip)
- [skipUntil](function/index.html#static-function-skipUntil)
- [startWith](function/index.html#static-function-startWith)
- [subscribeOn](function/index.html#static-function-subscribeOn)
- [switch](function/index.html#static-function-switch)
- [switchMap](function/index.html#static-function-switchMap)
- [switchMapTo](function/index.html#static-function-switchMapTo)
- [take](function/index.html#static-function-take)
- [takeUntil](function/index.html#static-function-takeUntil)
- [throttle](function/index.html#static-function-throttle)
- [timeout](function/index.html#static-function-timeout)
- [timeoutWith](function/index.html#static-function-timeoutWith)
- [toArray](function/index.html#static-function-toArray)
- [toPromise](function/index.html#static-function-toPromise)
- [window](function/index.html#static-function-window)
- [windowCount](function/index.html#static-function-windowCount)
- [windowTime](function/index.html#static-function-windowTime)
- [windowToggle](function/index.html#static-function-windowToggle)
- [windowWhen](function/index.html#static-function-windowWhen)
- [withLatestFrom](function/index.html#static-function-withLatestFrom)
- [zip](function/index.html#static-function-zip)
- [zipAll](function/index.html#static-function-zipAll)
### [» Install it](./manual/installation.html)
*How to install RxJS through npm or CDN*
### [» Learn it](./manual/overview.html)
*Read the Manual on Observables, Observer, Subject, etc*
### [» Full reference](./identifiers.html)
*Read detailed documentation on each operator*
87 changes: 87 additions & 0 deletions doc/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
## ES6 via npm

```none
npm install rxjs-es
```

To import the entire core set of functionality:

```js
import Rx from 'rxjs/Rx';

Rx.Observable.of(1,2,3)
```

To import only what you need by patching (this is useful for size-sensitive bundling):

```js
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/map';

Observable.of(1,2,3).map(x => x + '!!!'); // etc
```

To import what you need and use it with ES next function bind (best overall method, if possible):

```js
import {Observable} from 'rxjs/Observable';
import {map} from 'rxjs/operator/map';

Observable.of(1,2,3)::map(x => x + '!!!'); // etc
```

## CommonJS via npm

```none
npm install rxjs
```

Import all core functionality:

```js
var Rx = require('rxjs/Rx');

Rx.Observable.of(1,2,3); // etc
```

Import only what you need and patch Observable (this is useful in size-sensitive bundling scenarios):

```js
var Observable = require('rxjs/Observable').Observable;
// patch Observable with appropriate methods
require('rxjs/add/operator/map');

Observable.of(1,2,3).map(function (x) { return x + '!!!'; }); // etc
```

Import operators and use them _manually_ you can do the following (this is also useful for bundling):

```js
var Observable = require('rxjs/Observable').Observable;
var map = require('rxjs/operator/map').map;

map.call(Observable.of(1,2,3), function (x) { return x + '!!!'; });
```

You can also use the above method to build your own Observable and export it from your own module.

## All Module Types (CJS/ES6/AMD/TypeScript) via npm

To install this library via [npm](https://www.npmjs.org) **version 3**, use the following command:

```none
npm install @reactivex/rxjs
```

If you are using npm **version 2** before this library has achieved a stable version, you need to specify the library version explicitly:

```none
npm install @reactivex/rxjs@5.0.0-beta.1
```

## CDN

For CDN, you can use [npmcdn](https://npmcdn.com). Just replace `version` with the current
version on the link below:

https://npmcdn.com/@reactivex/rxjs@version/dist/global/Rx.umd.js
16 changes: 16 additions & 0 deletions doc/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Introduction

RxJS is a library for composing asynchronous and event-based programs by using observable sequences. It provides one core type, the [Observable](./overview.html#observable), satellite types (Observer, Schedulers, Subjects) and operators inspired by [Array#extras](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.6) (map, filter, reduce, every, etc) to allow handling asynchronous events as collections.

<span class="informal">Think of RxJS as lodash for events.</span>

ReactiveX combines the [Observer pattern](https://en.wikipedia.org/wiki/Observer_pattern) with the [Iterator pattern](https://en.wikipedia.org/wiki/Iterator_pattern) and [functional programming with collections](http://martinfowler.com/articles/collection-pipeline/#NestedOperatorExpressions) to fill the need for an ideal way of managing sequences of events.

The essential concepts in RxJS which solve async event management are:

- **Observable:** represents the idea of an invokable collection of future values or events.
- **Observer:** is a collection of callbacks that knows how to listen to values delivered by the Observable.
- **Subscription:** represents the execution of an Observable, is primarily useful for cancelling the execution.
- **Operators:** are pure functions that enable a functional programming style of dealing with collections with operations like `map`, `filter`, `concat`, `flatMap`, etc.
- **Subject:** is the equivalent to an EventEmitter, and the only way of multicasting a value or event to multiple Observers.
- **Schedulers:** are centralized dispatchers to control concurrency, allowing us to coordinate when computation happens on e.g. `setTimeout` or `requestAnimationFrame` or others.
Loading

0 comments on commit 97aa4f5

Please sign in to comment.