function streamFactory( options ) {
	var opts;
	if ( arguments.length ) {
		if ( !isObject( options ) ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
		}
		opts = assign( {}, options );
	} else {
		opts = {};
	}
	return debugStream;

	/**
	* Creates a transform stream for debugging stream pipelines.
	*
	* @private
	* @param {string} name - debug namespace
	* @param {Callback} [clbk] - callback to invoke upon receiving data
	* @throws {TypeError} must provide valid options
	* @throws {TypeError} must provide a valid callback argument
	* @returns {DebugStream} debug stream
	*/
	function debugStream( name, clbk ) {
		opts.name = name;
		if ( arguments.length > 1 ) {
			return new Stream( opts, clbk );
		}
		return new Stream( opts );
	}
}
Creates a reusable debug stream factory.

@param {Options} [options] - stream options
@param {boolean} [options.objectMode=false] - specifies whether the stream should operate in object mode
@param {NonNegativeNumber} [options.highWaterMark] - specifies the `Buffer` level for when `write()` starts returning `false`
@param {boolean} [options.allowHalfOpen=false] - specifies whether the stream should remain open even if one side ends
@param {boolean} [options.readableObjectMode=false] - specifies whether the readable side should be in object mode
@throws {TypeError} options argument must be an object
@returns {Function} debug stream factory

@example
var opts = {
    'objectMode': true,
    'highWaterMark': 64
};

var factory = streamFactory( opts );

// Assign each stream to a separate debug namespace...
var streams = [];
var i;
for ( i = 0; i < 10; i++ ) {
    streams.push( factory( 'stream '+i ) );
}