code: function Parser (stream) {
    var isTransform = stream && 'function' == typeof stream._transform;
    var isWritable = stream && 'function' == typeof stream._write;
  
    if (!isTransform && !isWritable) throw new Error('must pass a Writable or Transform stream in');
    debug('extending Parser into stream');
  
    // Transform streams and Writable streams get `_bytes()` and `_skipBytes()`
    stream._bytes = _bytes;
    stream._skipBytes = _skipBytes;
  
    // only Transform streams get the `_passthrough()` function
    if (isTransform) stream._passthrough = _passthrough;
  
    // take control of the streams2 callback functions for this stream
    if (isTransform) {
      stream._transform = transform;
    } else {
      stream._write = write;
    }
  }
docs: The `Parser` stream mixin works with either `Writable` or `Transform` stream
  instances/subclasses. Provides a convenient generic "parsing" API:
  
  _bytes(n, cb) - buffers "n" bytes and then calls "cb" with the "chunk"
  _skipBytes(n, cb) - skips "n" bytes and then calls "cb" when done
  
  If you extend a `Transform` stream, then the `_passthrough()` function is also
  added:
  
  _passthrough(n, cb) - passes through "n" bytes untouched and then calls "cb"
  
  @param {Stream} stream Transform or Writable stream instance to extend
  @api public