lib/stream_utils.js
function cacher() {
  let cache = false;
  return function(read) {
    return function readable(end, cb) {
      if (end === null && cache) {
        cb(null, cache);
      } else {
        read(end, function (end, data) {
          cache = data;
          cb(end, data)
        });
      }
    }
  }
}
function cacher() {
  let cache = false;
  return function(read) {
    return function readable(end, cb) {
      if (end === null && cache) {
        cb(null, cache);
      } else {
        read(end, function (end, data) {
          cache = data;
          cb(end, data)
        });
      }
    }
  }
}
function cacher ( ) { let cache = false ; return function ( read ) { return function readable ( end , cb ) { if ( end === null && cache ) { cb ( null , cache ) ; } else { read ( end , function ( end , data ) { cache = data ; cb ( end , data ) } ) ; } } } }
Through stream that remembers first value it got
and repeats it, propagates errors in both ways.
Through stream that remembers first value it got and repeats it propagates errors in both ways .