MCPcopy Index your code
hub / github.com/TanStack/ai / pump

Function pump

examples/ts-angular-chat/vite.config.ts:58–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 res.setHeader('Connection', 'keep-alive')
57 const reader = readable.getReader()
58 const pump = async () => {
59 while (true) {
60 const { done, value } = await reader.read()
61 if (done) break
62 res.write(value)
63 }
64 res.end()
65 }
66 pump().catch(() => res.end())
67 } catch (error: any) {
68 res.statusCode = 500

Callers 1

configureServerFunction · 0.70

Calls 3

writeMethod · 0.80
endMethod · 0.65
readMethod · 0.45

Tested by

no test coverage detected