src/index.js
function writeError(chunk) {
    // in production give the output as-is
    if (NODE_ENV === "production") {
      return this.queue(chunk);
    }

    clearTimeout(errorTimer);
    errorChunks.push(chunk.toString());
    errorTimer = setTimeout(() => {
      this.queue(formatErrors(errorChunks.join("")));
    }, 10);
  }
function writeError(chunk) {
    // in production give the output as-is
    if (NODE_ENV === "production") {
      return this.queue(chunk);
    }

    clearTimeout(errorTimer);
    errorChunks.push(chunk.toString());
    errorTimer = setTimeout(() => {
      this.queue(formatErrors(errorChunks.join("")));
    }, 10);
  }
function writeError ( chunk ) { // in production give the output as-is if ( NODE_ENV === "production" ) { return this . queue ( chunk ) ; } clearTimeout ( errorTimer ) ; errorChunks . push ( chunk . toString ( ) ) ; errorTimer = setTimeout ( ( ) => { this . queue ( formatErrors ( errorChunks . join ( "" ) ) ) ; } , 10 ) ; }
Used with through module to help us format errors and proxy
stderr output
@private
@method writeError
@param {string|buffer} chunk
Used with through module to help us format errors and proxy stderr output