<commit_before>/**
*
*	STREAM: from-array
*
*
*	DESCRIPTION:
*		- Converts an array to a readable stream.
*
*
*	NOTES:
*		[1] 
*
*
*	TODO:
*		[1] 
*
*
*	LICENSE:
*		MIT
*
*	Copyright (c) 2014. <NAME>.
*
*
*	AUTHOR:
*		<NAME>. <EMAIL>. 2014.
*
*/

(function() {
	'use strict';

	// MODULES //

	var Readable = require( 'readable-stream' ).Readable,
		validate = require( './validate.js' );


	// FUNCTIONS //

	/**
	* FUNCTION: copyOptions( options )
	*	Copies relevant stream options into a new object.
	*
	* @private
	* @param {Object} options - stream options
	* @returns {Object} options copy
	*/
	function copyOptions( options ) {
		var props = [
				'objectMode',
				'highWaterMark',
				'encoding'
			],
			copy = {},
			prop;

		for ( var i = 0; i < props.length; i++ ) {
			prop = props[ i ];
			if ( options.hasOwnProperty( prop ) ) {
				copy[ prop ] = options[ prop ];
			}
		}
		return copy;
	} // end FUNCTION copyOptions()


	// STREAM //

	/**
	* FUNCTION: Stream( arr[, options] )
	*	Readable stream constructor.
	*
	* @constructor
	* @param {Array} arr - array to convert into a readable stream
	* @param {Object} [options] - Readable stream options
	* @returns {Stream} Readable stream
	*/
	function Stream( arr, options ) {
		if ( !Array.isArray( arr ) ) {
			throw new TypeError( 'Stream()::invalid input argument. First argument must provide an array.' );
		}
		if ( arguments.length < 2 ) {
			options = {};
		}
		if ( !( this instanceof Stream ) ) {
			return new Stream( arr, options );
		}
		var err = validate( options );
		if ( err ) {
			throw err;
		}
		Readable.call( this, options );<commit_msg>[UPDATE] error message.<commit_after>/**
*
*	STREAM: from-array
*
*
*	DESCRIPTION:
*		- Converts an array to a readable stream.
*
*
*	NOTES:
*		[1] 
*
*
*	TODO:
*		[1] 
*
*
*	LICENSE:
*		MIT
*
*	Copyright (c) 2014. <NAME>.
*
*
*	AUTHOR:
*		<NAME>. <EMAIL>. 2014.
*
*/

(function() {
	'use strict';

	// MODULES //

	var Readable = require( 'readable-stream' ).Readable,
		validate = require( './validate.js' );


	// FUNCTIONS //

	/**
	* FUNCTION: copyOptions( options )
	*	Copies relevant stream options into a new object.
	*
	* @private
	* @param {Object} options - stream options
	* @returns {Object} options copy
	*/
	function copyOptions( options ) {
		var props = [
				'objectMode',
				'highWaterMark',
				'encoding'
			],
			copy = {},
			prop;

		for ( var i = 0; i < props.length; i++ ) {
			prop = props[ i ];
			if ( options.hasOwnProperty( prop ) ) {
				copy[ prop ] = options[ prop ];
			}
		}
		return copy;
	} // end FUNCTION copyOptions()


	// STREAM //

	/**
	* FUNCTION: Stream( arr[, options] )
	*	Readable stream constructor.
	*
	* @constructor
	* @param {Array} arr - array to convert into a readable stream
	* @param {Object} [options] - Readable stream options
	* @returns {Stream} Readable stream
	*/
	function Stream( arr, options ) {
		if ( !Array.isArray( arr ) ) {
			throw new TypeError( 'Stream()::invalid input argument. First argument must be an array.' );
		}
		if ( arguments.length < 2 ) {
			options = {};
		}
		if ( !( this instanceof Stream ) ) {
			return new Stream( arr, options );
		}
		var err = validate( options );
		if ( err ) {
			throw err;
		}
		Readable.call( this, options );
{'fraction_non_alphanumeric': 0.162319729978521, 'fraction_numerical': 0.00736422215403498, 'mean_word_length': 2.7045454545454546, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, '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': '6905673', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1165, 'n_words': 328}