{"id":19291348,"url":"https://github.com/annexare/idledetect","last_synced_at":"2025-06-21T03:33:58.358Z","repository":{"id":57271260,"uuid":"441307998","full_name":"annexare/IdleDetect","owner":"annexare","description":"A TypeScript library for inactivity timer, which utilises `IdleDetector` API where possible or a fallback to `window.setTimeout` approach.","archived":false,"fork":false,"pushed_at":"2024-03-06T12:37:32.000Z","size":70,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-22T07:01:54.349Z","etag":null,"topics":["cypress-tests","idledetector","inactivity-timer","timeout","typescript"],"latest_commit_sha":null,"homepage":"","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/annexare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-12-23T22:20:09.000Z","updated_at":"2024-03-04T10:43:57.000Z","dependencies_parsed_at":"2024-11-09T22:25:46.589Z","dependency_job_id":"fd47b9dd-7dfc-4626-afe4-5c7096d33df7","html_url":"https://github.com/annexare/IdleDetect","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"28d24933e2064a98d801d34629ba6d9a3ea1d016"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/annexare/IdleDetect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annexare%2FIdleDetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annexare%2FIdleDetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annexare%2FIdleDetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annexare%2FIdleDetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/annexare","download_url":"https://codeload.github.com/annexare/IdleDetect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annexare%2FIdleDetect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261057211,"owners_count":23103611,"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":["cypress-tests","idledetector","inactivity-timer","timeout","typescript"],"created_at":"2024-11-09T22:24:47.284Z","updated_at":"2025-06-21T03:33:53.329Z","avatar_url":"https://github.com/annexare.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Idle Detect\n\n[![IdleDetect Tests](https://github.com/annexare/IdleDetect/actions/workflows/tests.yml/badge.svg)](https://github.com/annexare/IdleDetect/actions/workflows/tests.yml)\n[![Monthly Downloads](https://img.shields.io/npm/dm/idle-detect.svg)](https://www.npmjs.com/package/idle-detect)\n\nA TypeScript library for inactivity timer, which utilises [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector) where possible or a fallback to `window.setTimeout` approach.\n\n## Usage\n\n```bash\nnpm install idle-detect\n```\n\n```ts\nimport IdleDetect from 'idle-detect'\n// Or, if you don't want to use still experimental IdleDetector API:\n// import { IdleDetect } from 'idle-detect/dist/IdleDetect'\n\nconst onInactive = () =\u003e {\n  console.info('User is inactive now')\n}\nconst idleDetect = new IdleDetect(15 * 60, onInactive)\n\n// Start timer, e.g. when user is logged in\nidleDetect.start()\n\n// End timer, e.g. when user is logged out\nidleDetect.cleanupAndStop()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannexare%2Fidledetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fannexare%2Fidledetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannexare%2Fidledetect/lists"}