MCPcopy Index your code
hub / github.com/anomalyco/opencode / normalizeStdin

Function normalizeStdin

packages/core/src/process.ts:112–119  ·  view source on GitHub ↗
(
  input: string | Uint8Array | Stream.Stream<Uint8Array, PlatformError>,
)

Source from the content-addressed store, hash-verified

110 })
111
112const normalizeStdin = (
113 input: string | Uint8Array | Stream.Stream<Uint8Array, PlatformError>,
114): Stream.Stream<Uint8Array, PlatformError> =>
115 typeof input === "string"
116 ? Stream.make(new TextEncoder().encode(input))
117 : input instanceof Uint8Array
118 ? Stream.make(input)
119 : input
120
121export const collectStream = (stream: Stream.Stream<Uint8Array, PlatformError>, maxOutputBytes: number | undefined) =>
122 Stream.runFold(

Callers 1

process.tsFile · 0.85

Calls 1

makeMethod · 0.45

Tested by

no test coverage detected