UNPKG

yoastseo

Version:

Yoast client-side content analysis

23 lines (21 loc) 647 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = calculateScore; var _yoastseo = require("yoastseo"); const { formatNumber } = _yoastseo.helpers; /** * Returns the Flesch reading score for Portuguese. * * @param {Object} statistics The Flesch reading statistics. * * @returns {number} The Flesch reading score for Portuguese. */ function calculateScore(statistics) { const score = 248.835 - 1.015 * statistics.averageWordsPerSentence - 84.6 * statistics.numberOfSyllables / statistics.numberOfWords; return formatNumber(score); } //# sourceMappingURL=calculateFleschReadingScore.js.map