{"id":21531896,"url":"https://github.com/matrixai/js-timer","last_synced_at":"2026-02-25T21:02:05.682Z","repository":{"id":59122665,"uuid":"535495785","full_name":"MatrixAI/js-timer","owner":"MatrixAI","description":"Reified timer object replacing `setTimeout`, use it like a \"Stopwatch\"","archived":false,"fork":false,"pushed_at":"2025-02-04T01:15:08.000Z","size":336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"staging","last_synced_at":"2025-03-23T03:15:56.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://polykey.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatrixAI.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":"2022-09-12T03:18:32.000Z","updated_at":"2025-02-04T01:11:50.000Z","dependencies_parsed_at":"2023-01-23T15:30:17.379Z","dependency_job_id":"3b82a74a-5f79-45bb-a1b5-659281f29f23","html_url":"https://github.com/MatrixAI/js-timer","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":"0.36363636363636365","last_synced_commit":"f1d3a32d7a4b27313e47d74bdf32c3707c74ff65"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatrixAI","download_url":"https://codeload.github.com/MatrixAI/js-timer/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248985185,"owners_count":21193900,"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":[],"created_at":"2024-11-24T02:18:05.265Z","updated_at":"2026-02-25T21:02:05.672Z","avatar_url":"https://github.com/MatrixAI.png","language":"TypeScript","readme":"# js-timer\n\nThis library provides a reified `Timer` replacing the imperative `setTimeout` in\nJS. This is useful for keeping track of elapsed time and calculating how time is\nleft. Think of this as a \"Stopwatch\".\n\nThis does not use `Date.now()`, it uses `Performance` API.\n\n## Installation\n\n```sh\nnpm install --save @matrixai/timer\n```\n\n## Usage\n\n```ts\nimport { Timer } from '@matrixai/timer';\n\nconst t1 = new Timer(() =\u003e 2, 10);\nconst result = await t1;\n```\n\n## Development\n\nRun `nix develop`, and once you're inside, you can use:\n\n```sh\n# install (or reinstall packages from package.json)\nnpm install\n# build the dist\nnpm run build\n# run the repl (this allows you to import from ./src)\nnpm run tsx\n# run the tests\nnpm run test\n# lint the source code\nnpm run lint\n# automatically fix the source\nnpm run lintfix\n```\n\n### Docs Generation\n\n```sh\nnpm run docs\n```\n\nSee the docs at: https://matrixai.github.io/js-timer/\n\n### Publishing\n\nPublishing is handled automatically by the staging pipeline.\n\nPrerelease:\n\n```sh\n# npm login\nnpm version prepatch --preid alpha # premajor/preminor/prepatch\ngit push --follow-tags\n```\n\nRelease:\n\n```sh\n# npm login\nnpm version patch # major/minor/patch\ngit push --follow-tags\n```\n\nManually:\n\n```sh\n# npm login\nnpm version patch # major/minor/patch\nnpm run build\nnpm publish --access public\ngit push\ngit push --tags\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fjs-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixai%2Fjs-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fjs-timer/lists"}