<commit_before>'use strict';

// MODULES //

var copy = require( '@stdlib/utils/copy' );
var Stream = require( './stream.js' );


// MAIN //

/**
* Creates a reusable join stream factory.
*
* @param {Options} [options] - stream options
* @param {string} [options.sep='\n'] - separator used to join streamed data
* @param {boolean} [options.objectMode=false] - specifies whether a stream should operate in object mode
* @param {(string|null)} [options.encoding=null] - specifies how `Buffer` objects should be decoded to `strings`
* @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
* @returns {Function} join stream factory
*
* @example
* var opts = {
*     'sep': '\t',
*     'objectMode': true,
*     'encoding': 'utf8',
*     'highWaterMark': 64
* };
*
* var factory = streamFactory( opts );
*
* // Create 10 identically configured streams...
* var streams = [];
* var i;
* for ( i = 0; i < 10; i++ ) {
*     streams.push( factory() );
* }
*/
function streamFactory( options ) {
	var opts;
	if ( arguments.length ) {
		opts = copy( options );
	} else {
		opts = {};
	}
	/**
	* Creates a transform stream for joining streamed data.
	*
	* @private
	* @throws {TypeError} must provide valid options
	* @returns {JoinStream} join stream
	*/
	return function joinStream() {
		return new Stream( opts );
	};
} // end FUNCTION streamFactory()


// EXPORTS //

module.exports = streamFactory;
<commit_msg>Remove use of function expression<commit_after>'use strict';

// MODULES //

var copy = require( '@stdlib/utils/copy' );
var Stream = require( './stream.js' );


// MAIN //

/**
* Creates a reusable join stream factory.
*
* @param {Options} [options] - stream options
* @param {string} [options.sep='\n'] - separator used to join streamed data
* @param {boolean} [options.objectMode=false] - specifies whether a stream should operate in object mode
* @param {(string|null)} [options.encoding=null] - specifies how `Buffer` objects should be decoded to `strings`
* @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
* @returns {Function} join stream factory
*
* @example
* var opts = {
*     'sep': '\t',
*     'objectMode': true,
*     'encoding': 'utf8',
*     'highWaterMark': 64
* };
*
* var factory = streamFactory( opts );
*
* // Create 10 identically configured streams...
* var streams = [];
* var i;
* for ( i = 0; i < 10; i++ ) {
*     streams.push( factory() );
* }
*/
function streamFactory( options ) {
	var opts;
	if ( arguments.length ) {
		opts = copy( options );
	} else {
		opts = {};
	}
	return joinStream;

	/**
	* Creates a transform stream for joining streamed data.
	*
	* @private
	* @throws {TypeError} must provide valid options
	* @returns {JoinStream} join stream
	*/
	function joinStream() {
		return new Stream( opts );
	} // end FUNCTION joinStream()
} // end FUNCTION streamFactory()


// EXPORTS //

module.exports = streamFactory;

{'fraction_non_alphanumeric': 0.14498567335243553, 'fraction_numerical': 0.004584527220630372, 'mean_word_length': 3.769125683060109, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2139915', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1042, 'n_words': 364}