@thi.ng/rstream
Version:
Reactive streams & subscription primitives for constructing dataflow graphs / pipelines
14 lines (13 loc) • 312 B
JavaScript
import { __optsWithID } from "./idgen.js";
import { fromIterable } from "./iterable.js";
import { metaStream } from "./metastream.js";
const debounce = (delay, opts) => metaStream(
(x) => fromIterable([x], { delay }),
__optsWithID("debounce", {
emitLast: true,
...opts
})
);
export {
debounce
};