examples/webpack/src/components/RelevantWords.js
function getRelevantWords( text, locale ) {
	if ( ! isEqual( text, previousRelevantWords.text ) || ! isEqual( locale, previousRelevantWords.locale ) ) {
		previousRelevantWords = {
			text,
			locale,
			data: calculateRelevantWords( text, locale ),
		};
	}
	return previousRelevantWords.data;
}
function getRelevantWords( text, locale ) {
	if ( ! isEqual( text, previousRelevantWords.text ) || ! isEqual( locale, previousRelevantWords.locale ) ) {
		previousRelevantWords = {
			text,
			locale,
			data: calculateRelevantWords( text, locale ),
		};
	}
	return previousRelevantWords.data;
}
function getRelevantWords ( text , locale ) { if ( ! isEqual ( text , previousRelevantWords . text ) || ! isEqual ( locale , previousRelevantWords . locale ) ) { previousRelevantWords = { text , locale , data : calculateRelevantWords ( text , locale ) , } ; } return previousRelevantWords . data ; }
Retrieve the relevant words. Uses cached version when possible.

@param {string} text   The text.
@param {string} locale The locale.

@returns {Object} The relevant words.
Retrieve the relevant words . Uses cached version when possible .