When writing NodeJS Transform stream in transform function how can I know if the chunk is the last one or there is no any new chunk coming.
_transform(chunk: any, encoding: string, callback: Function): void {
// accumulating chunks here to buffer
// so that I need to do some processing on the whole buffer
// and I need to understand when to do that
}
So I need to know when the chunks coming to the Stream are over, to do some processing on the buffer composed of all the chunks and then push the processed data from the stream.