@bowriverstudio/readingtime

    1.0.0 • Public • Published

    Reading Time

    This package calculates the estimated reading time based on Medium's algorithm. 200 words per min plus 12 seconds per image.

    The output is a simple react component.

    Installation

    npm i @bowriverstudio/readingtime

    Sample Usage

    import ReadingTime from "@bowriverstudio/readingtime";
    <ReadingTime theContent={post.content.rendered}></ReadingTime>
    <ReadingTime
      theContent={post.content.rendered}
      wordsPerMinute="100"
    ></ReadingTime>
    <ReadingTime
      theContent={post.content.rendered}
      imagesPerMinute="1"
    ></ReadingTime>
    export const StyledReadingTime = styled(ReadingTime)`
      color: red;
    `;
    <StyledReadingTime
      theContent={post.content.rendered}
      imagesPerMinute="1"
    ></StyledReadingTime>

    Demo

    Simple demo using Frontity and this readingtime package.

    https://reading-time-demo.bowriverstudio.vercel.app https://github.com/Bowriverstudio/reading-time-demo

    Code

    https://github.com/Bowriverstudio/readingtime

    Install

    npm i @bowriverstudio/readingtime

    DownloadsWeekly Downloads

    12

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    13.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • mtadros