A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ReactiveX/rxjs/issues/3797 below:

Deprecate the partition operator · Issue #3797 · ReactiveX/rxjs · GitHub

I think we should deprecate the partition operator and remove it for v7.

Reasons:

  1. Not really an operator: partition isn't really an "operator" in that it returns [Observable<T>, Observable<T>] rather than Observable<T>. This means it doesn't compose via pipe like the others.
  2. Easy to replace with filter: partition is easily replaced with the much more widely known filter operator. As partition is effectively the same thing as: const partition = (predicate) => [source.pipe(filter(predicate)), source.pipe(filter((x, i) => !predicate(x, i)))]
  3. Rarely used: It's little used, by any code survey I've taken (within thousands of lines of code that I know use RxJS)

martinsik, okunokentaro, elie29, cpatti97100 and nickbreaton


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4