lib/index.js
function isStream(io) {
  return typeof io === 'object' &&
    (
      // Readable stream.
      (typeof io.pipe === 'function' && typeof io.readable === 'boolean' &&
       io.readable) ||
      // Writable stream.
      (typeof io.write === 'function' && typeof io.writable === 'boolean' &&
       io.writable)
    );
}
function isStream(io) {
  return typeof io === 'object' &&
    (
      // Readable stream.
      (typeof io.pipe === 'function' && typeof io.readable === 'boolean' &&
       io.readable) ||
      // Writable stream.
      (typeof io.write === 'function' && typeof io.writable === 'boolean' &&
       io.writable)
    );
}
function isStream ( io ) { return typeof io === 'object' && ( // Readable stream. ( typeof io . pipe === 'function' && typeof io . readable === 'boolean' && io . readable ) || // Writable stream. ( typeof io . write === 'function' && typeof io . writable === 'boolean' && io . writable ) ) ; }
Returns true if `io` is a stream.

@param {Stream|Object} io
@return {Boolean}
Returns true if io is a stream .