<commit_before>'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var noop = require( '@stdlib/utils/noop' );
var pkg = require( './../package.json' ).name;
var isFunctionArray = require( './../lib' );


// FUNCTIONS //

/**
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
	var x;
	var i;

	x = [];
	for ( i = 0; i < len; i++ ) {
		x.push( noop );
	}
	return benchmark;

	/**
	* Benchmark function.
	*
	* @private
	* @param {Benchmark} b - benchmark instance
	*/
	function benchmark( b ) {
		var bool;
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			// Note: we are testing the worst case scenario where a function must scan the entire array before finding a failing value.
			x[ x.length ] = i;
			bool = isFunctionArray( x );
			if ( !isBoolean( bool ) ) {
				b.fail( 'should return a boolean' );
			}
		}
		b.toc();
		if ( isBoolean( bool ) ) {
			b.pass( 'benchmark finished' );
		} else {
			b.fail( 'should return a boolean' );
		}
		b.end();
	} // end FUNCTION benchmark()
} // end FUNCTION createBenchmark()
<commit_msg>Fix index<commit_after>'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var noop = require( '@stdlib/utils/noop' );
var pkg = require( './../package.json' ).name;
var isFunctionArray = require( './../lib' );


// FUNCTIONS //

/**
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
	var x;
	var i;

	x = [];
	for ( i = 0; i < len; i++ ) {
		x.push( noop );
	}
	return benchmark;

	/**
	* Benchmark function.
	*
	* @private
	* @param {Benchmark} b - benchmark instance
	*/
	function benchmark( b ) {
		var bool;
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			// Note: we are testing the worst case scenario where a function must scan the entire array before finding a failing value.
			x[ len-1 ] = i;
			bool = isFunctionArray( x );
			if ( !isBoolean( bool ) ) {
				b.fail( 'should return a boolean' );
			}
		}
		b.toc();
		if ( isBoolean( bool ) ) {
			b.pass( 'benchmark finished' );
		} else {
			b.fail( 'should return a boolean' );
		}
		b.end();
	} // end FUNCTION benchmark()
} // end FUNCTION createBenchmark()

{'fraction_non_alphanumeric': 0.16788041395170564, 'fraction_numerical': 0.0019164430816404753, 'mean_word_length': 2.8839285714285716, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2563056', 'n_tokens_mistral': 998, 'n_tokens_neox': 899, 'n_words': 279}