@tanstack/db-ivm
Version:
Incremental View Maintenance for TanStack DB based on Differential Dataflow
20 lines (19 loc) • 441 B
JavaScript
import { map } from "./map.js";
import { innerJoin } from "./join.js";
import { consolidate } from "./consolidate.js";
function filterBy(other) {
return (stream) => {
const otherKeys = other.pipe(
map(([key, _]) => [key, null])
);
return stream.pipe(
innerJoin(otherKeys),
map(([key, [value, _]]) => [key, value]),
consolidate()
);
};
}
export {
filterBy
};
//# sourceMappingURL=filterBy.js.map