Boundary string, retrieved from content-type
Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Transform incomming chunks into MultipartItem[].
We are either parsing http header, that are new line terminated, or the body, which is terminated by the boundary string. That's why we need to keep track which state we're currently in.
Depending on the state, for each index in the buffer we check for the termination string, and if matches, save eithere the header or the body.
All operations are performed with buffer.slice, which does not allocate new memory for the objects.
Event emitter The defined events on documents including:
A utility method for creating Readable Streams out of iterators.
Generated using TypeDoc
A node stream transformer, that would transform a buffer stream into a stream of parsed MultipartItem objects