{"id":23772429,"url":"https://github.com/lbenie/reading-time-estimator","last_synced_at":"2026-04-06T03:11:45.143Z","repository":{"id":37318409,"uuid":"142179167","full_name":"lbenie/reading-time-estimator","owner":"lbenie","description":"A medium's like reading time estimator with internationalization support","archived":false,"fork":false,"pushed_at":"2025-03-27T11:40:16.000Z","size":8001,"stargazers_count":49,"open_issues_count":2,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T18:07:10.207Z","etag":null,"topics":["es6","estimator","i18n","javascript","javascript-library","medium","reading","reading-time","time","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://lbenie.xyz","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbenie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/funding.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"lbenie"}},"created_at":"2018-07-24T15:36:37.000Z","updated_at":"2025-03-27T11:40:19.000Z","dependencies_parsed_at":"2023-09-22T01:39:11.215Z","dependency_job_id":"3d07a967-a743-439e-b5fb-6b7728522da0","html_url":"https://github.com/lbenie/reading-time-estimator","commit_stats":{"total_commits":1715,"total_committers":16,"mean_commits":107.1875,"dds":"0.37434402332361516","last_synced_commit":"135d71a3fe92ba497492487fbd8b4c74db6982fb"},"previous_names":[],"tags_count":87,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenie%2Freading-time-estimator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenie%2Freading-time-estimator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenie%2Freading-time-estimator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenie%2Freading-time-estimator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbenie","download_url":"https://codeload.github.com/lbenie/reading-time-estimator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234922,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es6","estimator","i18n","javascript","javascript-library","medium","reading","reading-time","time","typescript","typescript-library"],"created_at":"2025-01-01T04:55:12.964Z","updated_at":"2026-04-06T03:11:45.138Z","avatar_url":"https://github.com/lbenie.png","language":"TypeScript","funding_links":["https://github.com/sponsors/lbenie"],"categories":["TypeScript"],"sub_categories":[],"readme":"# reading-time-estimator\n\n[![Test](https://github.com/lbenie/reading-time-estimator/actions/workflows/test.yml/badge.svg)](https://github.com/lbenie/reading-time-estimator/actions/workflows/test.yml)\n[![Lint commit messages](https://github.com/lbenie/reading-time-estimator/actions/workflows/commintlint.yml/badge.svg)](https://github.com/lbenie/reading-time-estimator/actions/workflows/commintlint.yml)\n[![Release](https://github.com/lbenie/reading-time-estimator/actions/workflows/release.yml/badge.svg)](https://github.com/lbenie/reading-time-estimator/actions/workflows/release.yml)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![npm](https://img.shields.io/npm/l/reading-time-estimator.svg)](https://github.com/lbenie/reading-time-estimator/blob/main/LICENSE)\n[![npm](https://img.shields.io/npm/dt/reading-time-estimator.svg)](https://www.npmjs.com/package/reading-time-estimator)\n[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/reading-time-estimator.svg)](https://www.npmjs.com/package/reading-time-estimator)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/made-with-typescript.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/uses-badges.svg)](https://forthebadge.com)\n\nA [medium](https://medium.com/)'s like reading time estimator with\ninternationalization support.\n\n## Documentation\n\nReading Time Estimator was created to provide an estimate of how long to read an\narticle or blog as seen on [medium](https://medium.com/).\n\n### Installation\n\nWith NPM\n\n```bash\n  npm install reading-time-estimator\n```\n\nor Yarn\n\n```bash\n  yarn add reading-time-estimator\n```\n\n### API\n\nThe API is fairly simple. `readingTime` accepts the text to analyze plus an optional options object.\n\nPer default the locale is set to english `en`.\n\nPer default the words per minute is set to `200`.\n\nInputs are parsed as Markdown and sanitized as HTML automatically before word counting.\n\nYou can also provide `translations` to override locale strings or `htmlSanitizerOptions` to customize how markup is handled.\n\nAt the moment it supports these locales: `'en', 'fr', 'es', 'zh-cn', 'zh-tw', 'ja', 'de', 'pt-br', 'tr', 'ro', 'bn', 'sk', 'cs', 'ru', 'vi', 'it', 'id' and 'hi'`\n\n### Usage\n\nTry it live [here](https://codesandbox.io/s/condescending-rosalind-lll23r?file=/src/App.tsx)\n\n```typescript\nimport { readingTime } from 'reading-time-estimator'\n\nconst text = 'some text to parse'\n\n// custom words per minute\nconst result = readingTime(text, { wordsPerMinute: 10 })\n\n// output:\n// {\n//   minutes: 4,\n//   words: 43,\n//   text: `4 min read`\n// }\n\n// with french locale\nimport { fr } from 'reading-time-estimator/i18n/fr'\n\nconst frenchResult = readingTime(text, {\n  wordsPerMinute: 10,\n  language: 'fr',\n  {\n    fr,\n  },\n})\n\n// output:\n// {\n//   minutes: 4,\n//   words: 43,\n//   text: `4 min de lecture`\n// }\n```\n\n## Why Not ...?\n\n### reading-time\n\nThis [package](https://www.npmjs.com/package/reading-time) does not offer\ninternationalization support which was a must for me.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://lbenie.xyz/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/7316046?v=4?s=100\" width=\"100px;\" alt=\"Lucien Bénié\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLucien Bénié\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=lbenie\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=lbenie\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/visierrat\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1642224?v=4?s=100\" width=\"100px;\" alt=\"Victor Sierra\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVictor Sierra\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=visierrat\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/zchazc\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/10862234?v=4?s=100\" width=\"100px;\" alt=\"ZhangC\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eZhangC\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=zchazc\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/RichardMEN11\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/34884710?v=4?s=100\" width=\"100px;\" alt=\"Rich11\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRich11\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=RichardMEN11\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=RichardMEN11\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://matheusinit-blog.vercel.app/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/68296035?v=4?s=100\" width=\"100px;\" alt=\"Matheus Oliveira\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMatheus Oliveira\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=matheusinit\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/can-guven\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/76837895?v=4?s=100\" width=\"100px;\" alt=\"Can Güven\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCan Güven\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=can-guven\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/astrutz\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/22653731?v=4?s=100\" width=\"100px;\" alt=\"Alexander Strutz\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexander Strutz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=astrutz\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://contrails.space\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/41533924?v=4?s=100\" width=\"100px;\" alt=\"凝结尾迹\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003e凝结尾迹\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=zS1m\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.steempro.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/53206866?v=4?s=100\" width=\"100px;\" alt=\"Muhammad Faisal Amin\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMuhammad Faisal Amin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=faisalamin9696\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Grolicek\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/58747066?v=4?s=100\" width=\"100px;\" alt=\"Oliver Groma\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eOliver Groma\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=Grolicek\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://qnury.es\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/50016379?v=4?s=100\" width=\"100px;\" alt=\"Luo Wenjie\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLuo Wenjie\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=Qnurye\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://focussedflyer3.hashnode.dev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/36317458?v=4?s=100\" width=\"100px;\" alt=\"CK Wong\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCK Wong\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=FocussedFlyer3\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://shubhankarval.github.io\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/59073366?v=4?s=100\" width=\"100px;\" alt=\"Shubhankar Valimbe\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eShubhankar Valimbe\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/lbenie/reading-time-estimator/commits?author=shubhankarval\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbenie%2Freading-time-estimator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbenie%2Freading-time-estimator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbenie%2Freading-time-estimator/lists"}