MCPcopy Index your code
hub / github.com/Effect-TS/effect / dropWhileReader

Function dropWhileReader

packages/effect/src/internal/sink.ts:610–623  ·  view source on GitHub ↗
(
  predicate: Predicate<In>
)

Source from the content-addressed store, hash-verified

608
609/** @internal */
610const dropWhileReader = <In>(
611 predicate: Predicate<In>
612): Channel.Channel<Chunk.Chunk<In>, Chunk.Chunk<In>, never, never, unknown, unknown> =>
613 core.readWith({
614 onInput: (input: Chunk.Chunk<In>) => {
615 const out = pipe(input, Chunk.dropWhile(predicate))
616 if (Chunk.isEmpty(out)) {
617 return dropWhileReader(predicate)
618 }
619 return pipe(core.write(out), channel.zipRight(channel.identityChannel<Chunk.Chunk<In>, never, unknown>()))
620 },
621 onFailure: core.fail,
622 onDone: core.succeedNow
623 })
624
625/** @internal */
626export const dropWhileEffect = <In, E, R>(

Callers 1

dropWhileFunction · 0.85

Calls 3

pipeFunction · 0.70
isEmptyMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…