Needlessly Provoking Marsupials

    smog-formula
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    smog-formula

    Build Coverage Downloads Size

    Formula to detect the grade level of text according to the SMOG (simple measure of gobbledygook) formula.

    See syllable for detecting syllables.

    Install

    This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

    npm:

    npm install smog-formula

    Use

    import {smogFormula} from 'smog-formula'
    
    // For “The Australian platypus is seemingly a hybrid of a mammal and reptilian
    // creature.” (1 sentence; 4 polysillabic words).
    smogFormula({sentence: 1, polysillabicWord: 4})
    // => 14.554593…

    API

    This package exports the following identifiers: smogFormula. There is no default export.

    smogFormula(counts)

    Given an object containing the number of sentences (sentence) and the number of polysillabic (three or more syllables) words (polysillabicWord) in a document, returns the reading ease associated with the document.

    Related

    License

    MIT © Titus Wormer

    Install

    npm i smog-formula

    DownloadsWeekly Downloads

    1,456

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    6.84 kB

    Total Files

    5

    Last publish

    Collaborators

    • wooorm
    • zeke