lib/core/utils/get-selector.js
function uncommonClasses(node, selectorData) {
	// eslint no-loop-func:false
	let retVal = [];
	let classData = selectorData.classes;
	let tagData = selectorData.tags;

	if (node.classList) {
		Array.from(node.classList).forEach(cl => {
			let ind = escapeSelector(cl);
			if (classData[ind] < tagData[node.nodeName]) {
				retVal.push({
					name: ind,
					count: classData[ind],
					species: 'class'
				});
			}
		});
	}
	return retVal.sort(countSort);
}
function uncommonClasses(node, selectorData) {
	// eslint no-loop-func:false
	let retVal = [];
	let classData = selectorData.classes;
	let tagData = selectorData.tags;

	if (node.classList) {
		Array.from(node.classList).forEach(cl => {
			let ind = escapeSelector(cl);
			if (classData[ind] < tagData[node.nodeName]) {
				retVal.push({
					name: ind,
					count: classData[ind],
					species: 'class'
				});
			}
		});
	}
	return retVal.sort(countSort);
}
function uncommonClasses ( node , selectorData ) { // eslint no-loop-func:false let retVal = [ ] ; let classData = selectorData . classes ; let tagData = selectorData . tags ; if ( node . classList ) { Array . from ( node . classList ) . forEach ( cl => { let ind = escapeSelector ( cl ) ; if ( classData [ ind ] < tagData [ node . nodeName ] ) { retVal . push ( { name : ind , count : classData [ ind ] , species : 'class' } ) ; } } ) ; } return retVal . sort ( countSort ) ; }
Given a node and the statistics on class frequency on the page,
return all its uncommon class data sorted in order of decreasing uniqueness
@param {Element} node			The node
@param {Object} classData	The map of classes to counts
@return {Array}						The sorted array of uncommon class data
Given a node and the statistics on class frequency on the page return all its uncommon class data sorted in order of decreasing uniqueness