@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
10 lines (8 loc) • 424 B
JavaScript
import { FilterIterable } from './operators/filter';
import { bindCallback } from '../util/bindcallback';
export function partition(source, predicate, thisArg) {
const cb = bindCallback(predicate, thisArg, 2);
const notCb = bindCallback((value, index) => !predicate(value, index), thisArg, 2);
return [new FilterIterable(source, cb), new FilterIterable(source, notCb)];
}
//# sourceMappingURL=partition.mjs.map