docs: function onData(W) {
          var buffer = getBuffer(W),
              full = false,
              dropVal,
              N = 0,
              max = Number.NEGATIVE_INFINITY;
  
          // Initialize max to be < any potential array value.
  
          /**
          * FUNCTION: onData(newVal, encoding, clbk)
          *   Data event handler. Calculates the moving maximum.
          *
          * @private
          * @param {Number} newVal - streamed data value
          * @param {String} encoding
          * @param {Function} clbk - callback invoked after find the maximum. Function accepts two arguments: [ error, chunk ].
          */
          return function onData(newVal, encoding, clbk) {
              // Fill buffer of size W, find initial max
              if (!full) {
                  buffer[N] = newVal;
                  if (buffer[N] > max) {
                      max = buffer[N];
                  }
                  N++;
                  if (N===W) {
                      full = true;
                      this.push(max);
                  }
                  clbk();
                  return;
              }
  
              // Update buffer: (drop old value, add new)
              dropVal = buffer.shift();
              buffer.push(newVal);
  
              // Find the max...
  
              // Case 1:
              if (dropVal === max && newVal < max){
                  max = buffer[0];
                  for(var j=1; j<W; j++){
                      if (buffer[j] > max) {
                          max = buffer[j];
                      }
                  }
              }
              // Case 2:
              if (newVal > max){
                  max = newVal;
              }
              clbk(null, max);
          }; // end FUNCTION onData()
      }