UNPKG

424 BJavaScriptView Raw
1import { FilterIterable } from './operators/filter';
2import { bindCallback } from '../util/bindcallback';
3export function partition(source, predicate, thisArg) {
4 const cb = bindCallback(predicate, thisArg, 2);
5 const notCb = bindCallback((value, index) => !predicate(value, index), thisArg, 2);
6 return [new FilterIterable(source, cb), new FilterIterable(source, notCb)];
7}
8
9//# sourceMappingURL=partition.mjs.map