New Powerful Machines

    flesch-gauge

    0.2.0 • Public • Published

    Flesch Gauge

    Universal reactive component for displaying copy readability using the Flesch Reading Ease formula.

    Vanilla ES6+

    import FleschGauge from 'flesch-gauge'
    
    const fleschGauge = new FleschGauge({
        target: document.querySelector('#flesch-gauge-container'),
        props: {
            content: "This is the content to be measured."
        },
    })
    

    Vue

    <template>
        <div>
            <FleschGauge :content="content">
        </div>
    </template>
    
    <script>
    import FleschGauge from 'flesch-gauge/vue'
    
    export default {
      name: 'app',
      components: {
        FleschGauge,
      },
      data() {
          return {
              content: "This is the content to be measured."
          }
      },
    }
    </script>
    

    React

    import React from 'react';
    import FleschGauge from 'flesch-gauge/react'
    
    const content = "This is the content to be measured."
    
    const App = () => <FleschGauge content={content}/>
    
    export default App;
    

    Keywords

    none

    Install

    npm i flesch-gauge

    DownloadsWeekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    213 kB

    Total Files

    17

    Last publish

    Collaborators

    • sxule