<commit_before>'use strict';

// MODULES //

var factory = require( './factory.js' );


// SAMPLE //

/**
* Samples elements from an array-like object.
*
* @function sample
* @type {Function}
* @param {ArrayLike} x - array-like object to sample elements from
* @param {Options} [options] - function options
* @param {NonNegativeInteger} [options.size] - sample size
* @param {ProbabilityArray} [options.probs] - element probabilities
* @param {boolean} [options.replace=true] - boolean indicating whether to sample with replacement
* @throws {TypeError} first argument must be array-like
* @throws {TypeError} options argument must be an object
* @throws {TypeError} must provide valid options
* @throws {RangeError} `size` option must be smaller or equal to the length of `x` when `replace` is set to false
* @returns {Array} sample
*
* @example
* * var out = sample( [ 3, null, NaN, 'abc', function(){} ] );
* // e.g., returns [ 3, 'abc', null, 3, null ]
*/
var sample = factory();


// EXPORTS //

module.exports = sample;<commit_msg>Remove duplicate asterisk<commit_after>'use strict';

// MODULES //

var factory = require( './factory.js' );


// SAMPLE //

/**
* Samples elements from an array-like object.
*
* @function sample
* @type {Function}
* @param {ArrayLike} x - array-like object to sample elements from
* @param {Options} [options] - function options
* @param {NonNegativeInteger} [options.size] - sample size
* @param {ProbabilityArray} [options.probs] - element probabilities
* @param {boolean} [options.replace=true] - boolean indicating whether to sample with replacement
* @throws {TypeError} first argument must be array-like
* @throws {TypeError} options argument must be an object
* @throws {TypeError} must provide valid options
* @throws {RangeError} `size` option must be smaller or equal to the length of `x` when `replace` is set to false
* @returns {Array} sample
*
* @example
* var out = sample( [ 3, null, NaN, 'abc', function(){} ] );
* // e.g., returns [ 3, 'abc', null, 3, null ]
*/
var sample = factory();


// EXPORTS //

module.exports = sample;
{'fraction_non_alphanumeric': 0.14251439539347407, 'fraction_numerical': 0.0028790786948176585, 'mean_word_length': 4.135467980295567, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3436224', 'n_tokens_mistral': 633, 'n_tokens_neox': 613, 'n_words': 237}