MCPcopy Create free account
hub / github.com/Effect-TS/effect / evaluate

Function evaluate

packages/platform/node/src/NodeMultipart.ts:45–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 Effect.map((config) =>
44 NodeStream.fromReadable<MP.Part, Multipart.MultipartError>({
45 evaluate() {
46 const parser = MP.make(config)
47 // `pipe` does not forward source errors or a premature close.
48 const cleanup = finished(source, { readable: true, writable: false }, (error) => {
49 cleanup()
50 if (error) parser.destroy(error)
51 })
52 source.pipe(parser)
53 return parser as any
54 },
55 onError: (error) => convertError(error as any)
56 })
57 ),

Callers 4

NodeHttpServer.tsFile · 0.70
readFunction · 0.70
collectAsyncIterableFunction · 0.50
nativeMethod · 0.50

Calls 5

finishedFunction · 0.85
makeMethod · 0.65
pipeMethod · 0.65
cleanupFunction · 0.50
destroyMethod · 0.45

Tested by

no test coverage detected