partition.js 543 B

123456789101112
  1. /** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
  2. import { not } from '../util/not';
  3. import { subscribeTo } from '../util/subscribeTo';
  4. import { filter } from '../operators/filter';
  5. import { Observable } from '../Observable';
  6. export function partition(source, predicate, thisArg) {
  7. return [
  8. filter(predicate, thisArg)(new Observable(subscribeTo(source))),
  9. filter(not(predicate, thisArg))(new Observable(subscribeTo(source)))
  10. ];
  11. }
  12. //# sourceMappingURL=partition.js.map