bower_components/qunit/src/core/processing-queue.js
function addToQueue( callback, prioritize, seed ) {
	if ( prioritize ) {
		config.queue.splice( priorityCount++, 0, callback );
	} else if ( seed ) {
		if ( !unitSampler ) {
			unitSampler = unitSamplerGenerator( seed );
		}

		// Insert into a random position after all prioritized items
		const index = Math.floor( unitSampler() * ( config.queue.length - priorityCount + 1 ) );
		config.queue.splice( priorityCount + index, 0, callback );
	} else {
		config.queue.push( callback );
	}
}
function addToQueue( callback, prioritize, seed ) {
	if ( prioritize ) {
		config.queue.splice( priorityCount++, 0, callback );
	} else if ( seed ) {
		if ( !unitSampler ) {
			unitSampler = unitSamplerGenerator( seed );
		}

		// Insert into a random position after all prioritized items
		const index = Math.floor( unitSampler() * ( config.queue.length - priorityCount + 1 ) );
		config.queue.splice( priorityCount + index, 0, callback );
	} else {
		config.queue.push( callback );
	}
}
function addToQueue ( callback , prioritize , seed ) { if ( prioritize ) { config . queue . splice ( priorityCount ++ , 0 , callback ) ; } else if ( seed ) { if ( ! unitSampler ) { unitSampler = unitSamplerGenerator ( seed ) ; } // Insert into a random position after all prioritized items const index = Math . floor ( unitSampler ( ) * ( config . queue . length - priorityCount + 1 ) ) ; config . queue . splice ( priorityCount + index , 0 , callback ) ; } else { config . queue . push ( callback ) ; } }
Adds a function to the ProcessingQueue for execution.
@param {Function|Array} callback
@param {Boolean} priority
@param {String} seed
Adds a function to the ProcessingQueue for execution .