staltz / fantasy-observable

A specification for interoperability of push-based data sources in JavaScript
42 stars 3 forks source link

Fix regex issue in Observable-Observer contract section #1

Closed mickdekkers closed 7 years ago

mickdekkers commented 7 years ago

The spec states that:

The above contract may be expressed as a regular expression, specifying that next may be invoked zero or multiple times, but if either error or complete are invoked, no other Observer method invocation can occur:

next*(error|complete)?

However, next* means nex always occurs, and t may be repeated zero or more times. If you were to parenthesize it -- (next)* -- it would match the explanation.

Edit: I'm not sure why the diff is showing the last line has changed. I edited the file on GitHub and only added parentheses.