import/NDJSONStream.js
/**
     * After we have consumed and transformed the entire input, the buffer may
     * still contain the last line so make sure we handle that as well
     * @param {function} next 
     */
After we have consumed and transformed the entire input, the buffer may
still contain the last line so make sure we handle that as well
@param {function} next
After we have consumed and transformed the entire input the buffer may still contain the last line so make sure we handle that as well @param { function } next
_flush(next)
    {
        try {
            if (this._stringBuffer) {
                const json = JSON.parse(this._stringBuffer);
                this._stringBuffer = "";
                this.push(json);
            }
            next();
        } catch (error) {
            next(new SyntaxError(
                `Error parsing NDJSON on line ${this._line + 1}: ${error.message}`
            ));
        }
    }
_flush ( next ) { try { if ( this . _stringBuffer ) { const json = JSON . parse ( this . _stringBuffer ) ; this . _stringBuffer = "" ; this . push ( json ) ; } next ( ) ; } catch ( error ) { next ( new SyntaxError ( ` ${ this . _line + 1 } ${ error . message } ` ) ) ; } }
After we have consumed and transformed the entire input, the buffer may
 still contain the last line so make sure we handle that as well
 @param {function} next
After we have consumed and transformed the entire input the buffer may still contain the last line so make sure we handle that as well @param { function } next