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

Function read

packages/platform/node/test/MultipartParser.test.ts:785–808  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

783 }
784 })
785 async function read() {
786 for await (const part of parser) {
787 if (part._tag === "Field") {
788 parts.push([
789 "field",
790 part.info.name,
791 Multipart.decodeField(part.info, part.value),
792 part.info.contentType
793 ])
794 } else {
795 let size = 0
796 for await (const chunk of part) {
797 size += chunk.length
798 }
799 parts.push([
800 "file",
801 part.info.name,
802 size,
803 part.info.filename!,
804 part.info.contentType
805 ])
806 }
807 }
808 }
809
810 const readPromise = read()
811

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected