import { limits } from "./limits"; import { skips } from "./skips"; export function slices(start = 0, end = Infinity) { const count = end - start; const { readable, writable } = new TransformStream(); return { writable, readable: readable.pipeThrough(skips(start)).pipeThrough(limits(count)), }; }