<commit_before>'use strict';

// MODULES //

var GlobalSet = require( './set.js' );


// HAS SET SUPPORT //

/**
* Tests for native `Set` support.
*
* @returns {boolean} boolean indicating if an environment has `Set` support
*
* @example
* var bool = hasSetSupport();
* // returns <Boolean>
*/
function hasSetSupport() {
	var bool;
	var val;
	var set;

	if ( typeof GlobalSet !== 'function' ) {
		return false;
	}
	// Test basic support...
	try {
		val = {};
		set = new GlobalSet();
		set.add( val );
		bool = set.has( val );
	} catch ( err ) {
		bool = false;
	}
	return bool;
} // end FUNCTION hasSetSupport()


// EXPORTS //

module.exports = hasSetSupport;
<commit_msg>Attempt to add an element twice<commit_after>'use strict';

// MODULES //

var GlobalSet = require( './set.js' );


// HAS SET SUPPORT //

/**
* Tests for native `Set` support.
*
* @returns {boolean} boolean indicating if an environment has `Set` support
*
* @example
* var bool = hasSetSupport();
* // returns <Boolean>
*/
function hasSetSupport() {
	var bool;
	var val;
	var set;

	if ( typeof GlobalSet !== 'function' ) {
		return false;
	}
	// Test basic support...
	try {
		val = {};
		set = new GlobalSet();
		set.add( val );
		set.add( val );
		bool = set.has( val );
	} catch ( err ) {
		bool = false;
	}
	return bool;
} // end FUNCTION hasSetSupport()


// EXPORTS //

module.exports = hasSetSupport;

{'fraction_non_alphanumeric': 0.16329479768786126, 'fraction_numerical': 0.0, 'mean_word_length': 2.868715083798883, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3112037', 'n_tokens_mistral': 496, 'n_tokens_neox': 475, 'n_words': 147}