Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

**An open standard for sound, interoperable JavaScript Observables.**

An *Observable* is an object that can send multiple values to a consumer. An Observable has a `subscribe` method accepts a generator and send it any number of values.
An *Observable* is an object that can send multiple values to a consumer. An Observable has a `subscribe` method, which accepts a generator and sends it any number of values.

This specification details the behavior of the `subscribe` method, providing an interoperable base which all conformant Observable implementations can be depended on to provide. As such, the specification should be considered very stable. Although the Observable organization may occasionally revise this specification with minor backward-compatible changes to address newly-discovered corner cases, we will integrate large or backward-incompatible only after careful consideration, discussion, and testing.
This specification details the behavior of the `subscribe` method, providing an interoperable base which all conformant Observable implementations can be depended on to provide. As such, the specification should be considered very stable. Although the Observable organization may occasionally revise this specification with minor backward-compatible changes to address newly-discovered corner cases, we will integrate large or backward-incompatible changes only after careful consideration, discussion, and testing.

The core Observable specification does not deal with how to create Observables, Generators, or Subscriptions, choosing instead to focus on providing an interoperable a `subscribe` method. Future work in companion specifications may touch on these subjects.

Expand All @@ -28,10 +28,10 @@ var subscription = observable.subscribe(generator);
1. it must never be called after the `dispose` method on the subscription generated by `subscribe` has been called.
1. it may optionally be passed a value.
1. it may optionally return a value when called.
1. if it returns an object with a `done` value of true, the `dispose` method on the subscription generated by the call to `subscribe` must be called.
1. if it returns an object with a `done` value of `true`, the `dispose` method on the subscription generated by the call to `subscribe` must be called.
1. If generator is an object with a `throw` method.
1. it must never be called after the `dispose` method on the subscription generated by `subscribe` has been called.
1. otherwise it must be called if an error thrown anywhere in code either executed synchronously or asynchronously by observable. The error must be passed as the argument to the function.
1. otherwise it must be called if an error is thrown anywhere in code either executed synchronously or asynchronously by the observable. The error must be passed as the argument to the function.
1. it may optionally return a value when called.
1. after it is called, the `dispose` method on the subscription generated by the call to `subscribe` must be called.
1. If generator is an object with a `return` method.
Expand All @@ -41,8 +41,8 @@ var subscription = observable.subscribe(generator);
1. it may optionally return a value when called.
1. after it is called, the `dispose` method on the subscription generated by the call to `subscribe` must be called.

1. `subscribe` must return an subscription.
1. it must be an object with a dispose method.
1. `subscribe` must return a subscription.
1. it must be an object with a `dispose` method.
1. a call to the `dispose` method should free all references to the generator held by the observable.
1. the `dispose` method may be called multiple times. However every subsequent call after the first one should not have any side effects.

Expand Down