{"id":21743839,"url":"https://github.com/wavevision/timer","last_synced_at":"2026-04-09T20:01:35.027Z","repository":{"id":42945997,"uuid":"233639243","full_name":"wavevision/timer","owner":"wavevision","description":"⏱ Simple resumable timeout handler","archived":false,"fork":false,"pushed_at":"2023-01-07T13:41:27.000Z","size":1735,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T05:02:16.332Z","etag":null,"topics":["browser","node","resumable","timeout","timer","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/wavevision.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}},"created_at":"2020-01-13T16:21:27.000Z","updated_at":"2022-11-26T21:20:07.000Z","dependencies_parsed_at":"2023-02-07T07:56:29.135Z","dependency_job_id":null,"html_url":"https://github.com/wavevision/timer","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavevision%2Ftimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavevision%2Ftimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavevision%2Ftimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavevision%2Ftimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavevision","download_url":"https://codeload.github.com/wavevision/timer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244722616,"owners_count":20499151,"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":["browser","node","resumable","timeout","timer","typescript"],"created_at":"2024-11-26T07:09:14.236Z","updated_at":"2026-04-09T20:01:29.775Z","avatar_url":"https://github.com/wavevision.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/wavevision\"\u003e\u003cimg alt=\"Wavevision s.r.o.\" src=\"https://wavevision.com/images/wavevision-logo.png\" width=\"120\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eTimer\u003c/h1\u003e\n\n[![CI](https://github.com/wavevision/timer/workflows/CI/badge.svg)](https://github.com/wavevision/timer/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/wavevision/timer/badge.svg?branch=master)](https://coveralls.io/github/wavevision/timer?branch=master)\n[![npm](https://img.shields.io/npm/v/@wavevision/timer)](https://www.npmjs.com/package/@wavevision/timer)\n\nSimple utility for creating resumable timeouts written in TypeScript. Works both in Node and browser environments.\n\n## Installation\n\nVia [Yarn](https://yarnpkg.com)\n\n```bash\nyarn add @wavevision/timer\n```\n\nor [npm](https://npmjs.com)\n\n```bash\nnpm install --save @wavevision/timer\n```\n\n## Usage\n\nCreate your own timer.\n\n```typescript\nimport timer from '@wavevision/timer';\n\ntimer(() =\u003e alert('Time is up!'), 1000);\n// this timer will be auto-started\ntimer(() =\u003e alert('Hello!'), 500, true);\n```\n\nThe returned object exposes following functions:\n\n- **`clear(): void`** – clears the timeout\n- **`pause(): number`** – pauses the timeout, returns remaining time\n- **`remains(): number`** – returns remaining time\n- **`restart(): void`** – clears and starts the timeout over again\n- **`resume(): void`** – resumes the timeout (or starts if not running)\n- **`running(): boolean`** – returns whether the timeout is running at the moment\n- **`start(): void`** – starts the timeout (or resumes if paused)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavevision%2Ftimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavevision%2Ftimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavevision%2Ftimer/lists"}