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

Function streamLines

packages/platform/src/internal/commandExecutor.ts:31–36  ·  view source on GitHub ↗
(command, encoding)

Source from the content-addressed store, hash-verified

29 const stream: _CommandExecutor.CommandExecutor["stream"] = (command) =>
30 Stream.unwrapScoped(Effect.map(start(command), (process) => process.stdout))
31 const streamLines: _CommandExecutor.CommandExecutor["streamLines"] = (command, encoding) => {
32 const decoder = new TextDecoder(encoding)
33 return Stream.splitLines(
34 Stream.mapChunks(stream(command), Chunk.map((bytes) => decoder.decode(bytes)))
35 )
36 }
37 return {
38 [TypeId]: TypeId,
39 start,

Callers 1

makeExecutorFunction · 0.70

Calls 3

decodeMethod · 0.80
streamFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected