async-multipart-iterator
Iterate the parts of an RFC 1528 multipart (multipart/mixed, multipart/alternative, multipart/digest, multipart/parallel) document, sequentially producing a header and a body iterator for each part.
Quick example
'use strict'const someInputFile = 'something'; // name of a multipart file to be parsedconst someOutputDir = '/tmp/something'; // name of a directory in which bodies of each of the parts will be writtenconst boundary = 'cd67d1a112145bdcfdce0c5839b36b53'; // the boundaries to be found in the input file const fs = ;const multipartIterator = ; { const input = fs; let count = 0; for await let header bodyIterator of // here for each part of the document console // right now just an array of unparsed lines from the part's header const stream = fs; for { await stream; } await stream; }