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

Function stream

packages/platform-node-shared/src/internal/multipart.ts:16–32  ·  view source on GitHub ↗
(
  source: Readable,
  headers: IncomingHttpHeaders
)

Source from the content-addressed store, hash-verified

14
15/** @internal */
16export const stream = (
17 source: Readable,
18 headers: IncomingHttpHeaders
19): Stream.Stream<Multipart.Part, Multipart.MultipartError> =>
20 pipe(
21 Multipart.makeConfig(headers as any),
22 Effect.map(
23 (config) =>
24 NodeStream.fromReadable<Multipart.MultipartError, MP.Part>(() => {
25 const parser = MP.make(config)
26 source.pipe(parser)
27 return parser
28 }, (error) => convertError(error as any))
29 ),
30 Stream.unwrap,
31 Stream.map(convertPart)
32 )
33
34/** @internal */
35export const persisted = (

Callers 1

persistedFunction · 0.70

Calls 5

convertErrorFunction · 0.70
mapMethod · 0.65
makeMethod · 0.65
pipeMethod · 0.65
pipeFunction · 0.50

Tested by

no test coverage detected