examples/webpack/src/utils/formatAnalyzeResult.js
function mapResults( results ) {
	const mappedResults = [];

	for ( let i = 0; i < results.length; i++ ) {
		if ( ! results[ i ].text ) {
			continue;
		}
		mappedResults.push( mapResult( results[ i ] ) );
	}

	return sortResults( mappedResults );
}
function mapResults( results ) {
	const mappedResults = [];

	for ( let i = 0; i < results.length; i++ ) {
		if ( ! results[ i ].text ) {
			continue;
		}
		mappedResults.push( mapResult( results[ i ] ) );
	}

	return sortResults( mappedResults );
}
Maps results to a results that can be interpreted by the AnalysisList component.

@param {object} results Results provided by the worker.

@returns {Array} The mapped results.