1.0.1 β€’ Published 5 months ago

lesetid v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

πŸ“– lesetid

/leːsΙ™tiːd/, Norwegian: "lesetid"

✨ Features

πŸ“¦ Installation

pnpm install lesetid

πŸ“š Usage

import { estimate } from "lesetid";

const {
  minutes,
  rawMinutes,
  words
} = estimate("Hello World!");

or you can use the streaming approach

import { Readable } from "node:stream";
import { createReadingTimeStream } from "lesetid/stream";

const readingTimeStream = await fetch("https://next.luxass.dev/projects/eslint-config/raw")
  .then((res) => Readable.from(res.body, {
    encoding: "utf-8",
  }))
  .then((body) => body.pipe(createReadingTimeStream()));

readingTimeStream.on("data", (data) => {
  console.info(data);
});

πŸ™Œ Acknowledgements

I would like to thank ngryman for his work on reading-time which inspired me to create this package.

πŸ“„ License

Published under MIT License.