JSPM

flesch-kincaid-calc

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q50173F
  • License MIT

A library for calculating the Flesch-Kincaid grade level and reading ease.

Package Exports

  • flesch-kincaid-calc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (flesch-kincaid-calc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Flesch-Kincaid Calc

This simple library provides two functions, getGradeLevel and getReadingEase, to allow you to calculate the grade level and reading ease using the Flesch-Kincaid method.

Run the examples with node example.js.

Usage

const fk = require("flesch-kincaid-calc");

const THREE_LITTLE_PIGS = `Once upon a time there was an old mother pig who had three little pigs and not enough food to feed them. So when they were old enough, she sent them out into the world to seek their fortunes. The first little pig was very lazy. He didn't want to work at all and he built his house out of straw. The second little pig worked a little bit harder but he was somewhat lazy too and he built his house out of sticks. Then, they sang and danced and played together the rest of the day.`

fk.getGradeLevel(THREE_LITTLE_PIGS); //4.947989690721649485
fk.getReadingEase(THREE_LITTLE_PIGS); //88.38253436426116838