reading-level
Reading-level returns the numeric reading level of a sample text based on the Flesch-Kincaid Grade Level Readability Formula.
const { readingLevel } = require('reading-level')
const text1 = 'this is a simple sentence'
const text2 = 'the perpendicular platypus perused the panoramic pyramid'
const text3 = '0120131908 74123987419823'
const text4 = ''
readingLevel(text1)
readingLevel(text2)
readingLevel(text3)
readingLevel(text4)
readingLevel(text2, 'full')
- all numeric values and punctuation are stripped out before analysis
- pass
'full'
as a second argument to get the breakdown - this seems to work with languages besides english, however I have no idea about the accuracy of the results
test
npm run test