MCPcopy
hub / github.com/simstudioai/sim / start

Function start

apps/sim/app/api/table/import-csv/route.test.ts:77–86  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

75 const body = buildBody(parts)
76 const stream = new ReadableStream<Uint8Array>({
77 start(controller) {
78 if (chunkSize) {
79 for (let i = 0; i < body.length; i += chunkSize) {
80 controller.enqueue(new Uint8Array(body.subarray(i, i + chunkSize)))
81 }
82 } else {
83 controller.enqueue(new Uint8Array(body))
84 }
85 controller.close()
86 },
87 })
88 return {
89 headers: new Headers({ 'content-type': `multipart/form-data; boundary=${BOUNDARY}` }),

Callers

nothing calls this directly

Calls 2

enqueueMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected