UNPKG

automated-readability

Version:

Formula to detect the ease of reading a text according to the Automated Readability Index (1967)

17 lines (16 loc) 599 B
/** * @typedef {Object.<string, number>} AutomatedReadabilityCounts * @property {number} sentence * @property {number} word * @property {number} character */ /** * Given an object containing the number of words (`word`), the number of sentences (`sentence`), and the number of characters (`character`) in a document, returns the grade level associated with the document. * * @param {AutomatedReadabilityCounts} counts * @return {number} */ export function automatedReadability(counts: AutomatedReadabilityCounts): number export type AutomatedReadabilityCounts = { [x: string]: number }