yoastseo
Version:
Yoast client-side content analysis
19 lines (18 loc) • 742 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.includesWordsAtPosition = includesWordsAtPosition;
/**
* Checks whether a sequence of words in a particular order can be found at the given index in the word list.
*
* @param {string[]} consecutiveWords The sequence of words in a particular order.
* @param {number} index The position at which to find the consecutive word.
* @param {string[]} words The text.
*
* @returns {boolean} Whether consecutiveWords can be found at the given index in words.
*/
function includesWordsAtPosition(consecutiveWords, index, words) {
return consecutiveWords.every((word, j) => words[index + j] === word);
}
//# sourceMappingURL=includesWordsAtPosition.js.map