{"id":26776305,"url":"https://github.com/ahsanayaz/ngx-read-time","last_synced_at":"2025-06-12T14:35:29.502Z","repository":{"id":39495330,"uuid":"137142640","full_name":"AhsanAyaz/ngx-read-time","owner":"AhsanAyaz","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-04T04:08:08.000Z","size":4506,"stargazers_count":4,"open_issues_count":31,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-16T01:50:57.583Z","etag":null,"topics":["angular","articles","medium-article","reading","reading-time","readtime","typescript"],"latest_commit_sha":null,"homepage":"https://ahsanayaz.github.io/ngx-read-time","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AhsanAyaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2018-06-13T00:37:48.000Z","updated_at":"2023-03-26T02:21:47.000Z","dependencies_parsed_at":"2025-04-16T01:44:18.439Z","dependency_job_id":"2a29b0c3-09d0-4da9-9ada-8521ec75b183","html_url":"https://github.com/AhsanAyaz/ngx-read-time","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AhsanAyaz/ngx-read-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fngx-read-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fngx-read-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fngx-read-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fngx-read-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AhsanAyaz","download_url":"https://codeload.github.com/AhsanAyaz/ngx-read-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fngx-read-time/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259483019,"owners_count":22864868,"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":["angular","articles","medium-article","reading","reading-time","readtime","typescript"],"created_at":"2025-03-29T03:34:39.049Z","updated_at":"2025-06-12T14:35:29.471Z","avatar_url":"https://github.com/AhsanAyaz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NgxReadTime\r\n\r\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.0.\r\n\r\n## Demo\r\n\r\n[https://ahsanayaz.github.io/ngx-read-time/demo](https://ahsanayaz.github.io/ngx-read-time/demo)\r\n\r\n## Docs\r\n\r\n[https://ahsanayaz.github.io/ngx-read-time](https://ahsanayaz.github.io/ngx-read-time)\r\n\r\n## Installation\r\n\r\nTo install this library, run:\r\n```bash\r\nnpm install ngx-read-time --save\r\n```\r\n\r\nIn your component where you want to use:\r\n\r\n```typescript\r\nimport { Component } from '@angular/core';\r\nimport { ReadTimeConfig, TimeUnit } from 'ngx-read-time';\r\n\r\n@Component({\r\n  selector: 'app-root',\r\n  templateUrl: './app.component.html',\r\n  styleUrls: ['./app.component.css']\r\n})\r\nexport class AppComponent {\r\n  title = 'demo';\r\n  readTime: string;\r\n  rtConfig: ReadTimeConfig = {\r\n    wordsPerMinute: 250,\r\n    timeUnit: TimeUnit.MINUTES\r\n  }\r\n}\r\n\r\n```\r\n\r\nIn your HTML file:\r\n\r\n```html\r\n\u003carticle nrtReadTime [options]=\"rtConfig\" (timeCalculated)=\"readTime = $event.minutes\"\u003e\r\n    \u003ch1\u003eUnderstanding Discriminated Unions in Typescript\r\n      \u003cspan\u003e\r\n        \u003ca href=\"https://dev.to/ahsanayaz/understanding-discriminated-unions-in-typescript-5cd\"\u003e\r\n          (Source)\r\n        \u003c/a\u003e\r\n      \u003c/span\u003e\r\n    \u003c/h1\u003e\r\n\r\n    // Here will the description of the article\r\n  \u003c/article\u003e\r\n``` \r\n\r\nAlso add `NgxReadTimeModule` Module in your AppModule or the Module in which you are using this library.\r\n\r\n```typescript\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { AppComponent } from './app.component';\r\nimport { NgxReadTimeModule } from 'ngx-read-time';\r\n\r\n@NgModule({\r\n  declarations: [\r\n    AppComponent\r\n  ],\r\n  imports: [\r\n    BrowserModule,\r\n    NgxReadTimeModule\r\n  ],\r\n  providers: [],\r\n  bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n\r\n```\r\n\r\n## Development server\r\n\r\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\r\n\r\n## Code scaffolding\r\n\r\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\r\n\r\n## Build\r\n\r\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\r\n\r\n## Running unit tests\r\n\r\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\r\n\r\n## Running end-to-end tests\r\n\r\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\r\n\r\n## Further help\r\n\r\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahsanayaz%2Fngx-read-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahsanayaz%2Fngx-read-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahsanayaz%2Fngx-read-time/lists"}