Maps a single results to a result that can be interpreted by the AnalysisList component.

@param {object} result Result provided by the worker.

@returns {Object} The mapped result.
function mapResult( result ) {
	result.id = result.getIdentifier();
	result.rating = scoreToRating( result.score );
	result.hasMarks = result.hasMarks();
	result.marker = result.getMarker();

	// Because of inconsistency between YoastSEO and yoast-components.
	if ( result.rating === "ok" ) {
		result.rating = "OK";
	}

	return result;
}