yoastseo
Version:
Yoast client-side content analysis
23 lines (21 loc) • 635 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = calculateScore;
var _yoastseo = require("yoastseo");
const {
formatNumber
} = _yoastseo.helpers;
/**
* Returns the Flesch reading score for Spanish.
*
* @param {Object} statistics The Flesch reading statistics.
*
* @returns {number} The Flesch reading score for Spanish.
*/
function calculateScore(statistics) {
const score = 206.84 - 1.02 * statistics.numberOfWords / statistics.numberOfSentences - 0.6 * statistics.syllablesPer100Words;
return formatNumber(score);
}
//# sourceMappingURL=calculateFleschReadingScore.js.map