{"id":20879765,"url":"https://github.com/ryohidaka/chrome-alarms","last_synced_at":"2026-02-18T06:30:58.701Z","repository":{"id":219653538,"uuid":"748963653","full_name":"ryohidaka/chrome-alarms","owner":"ryohidaka","description":"Helper for chrome.alarms API.","archived":false,"fork":false,"pushed_at":"2025-02-24T08:04:10.000Z","size":490,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T23:41:51.154Z","etag":null,"topics":["alarm","chrome","ext","extension","extensions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/chrome-alarms","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/ryohidaka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["ryohidaka"],"patreon":null,"open_collective":null,"ko_fi":"ryohidaka","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-01-27T07:01:56.000Z","updated_at":"2024-12-02T08:05:23.000Z","dependencies_parsed_at":"2024-01-29T00:04:17.501Z","dependency_job_id":"f1288b47-802c-4202-a6bb-b081e2998594","html_url":"https://github.com/ryohidaka/chrome-alarms","commit_stats":null,"previous_names":["ryohidaka/chrome-alarms"],"tags_count":3,"template":false,"template_full_name":"ryohidaka/npm-package-template","purl":"pkg:github/ryohidaka/chrome-alarms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-alarms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-alarms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-alarms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-alarms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryohidaka","download_url":"https://codeload.github.com/ryohidaka/chrome-alarms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-alarms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29570326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T06:19:27.422Z","status":"ssl_error","status_checked_at":"2026-02-18T06:18:44.348Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["alarm","chrome","ext","extension","extensions"],"created_at":"2024-11-18T07:17:45.641Z","updated_at":"2026-02-18T06:30:58.679Z","avatar_url":"https://github.com/ryohidaka.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ryohidaka","https://ko-fi.com/ryohidaka","https://ko-fi.com/B0B6TVH92"],"categories":[],"sub_categories":[],"readme":"# chrome-alarms\n\n[![npm version](https://badge.fury.io/js/chrome-alarms.svg)](https://badge.fury.io/js/chrome-alarms)\n![build](https://github.com/ryohidaka/chrome-alarms/workflows/Build/badge.svg)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B6TVH92)\n\n## Overview\n\nHelper for `chrome.alarms` API.\n\n## Notes\n\nTo use the `chrome.alarms` API, declare the `\"alarms\"` permission in the [manifest](https://developer.chrome.com/docs/extensions/reference/manifest):\n\n```json\n{\n  \"name\": \"My extension\",\n\n  \"permissions\": [\"alarms\"]\n}\n```\n\n## Installation\n\nYou can install this library using npm:\n\n```shell\nnpm install chrome-alarms\n```\n\n## Properties\n\n| Key               | Type   | Optional | Description                                                                                   |\n| ----------------- | ------ | -------- | --------------------------------------------------------------------------------------------- |\n| `name`            | string |          | Name of this alarm.                                                                           |\n| `periodInMinutes` | number | ◯        | If not null, the alarm is a repeating alarm and will fire again in `periodInMinutes` minutes. |\n\n## Methods\n\n### `create`\n\nCreates an alarm. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nconst name = \"test\";\nconst periodInMinutes = 1;\n\nawait Alarm.create(name, periodInMinutes);\n```\n\n### `clear`\n\nClears the alarm with the given name.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nconst name = \"test\";\n\nawait Alarm.clear(name);\n```\n\n### `clearAll`\n\nClears all alarms.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nawait Alarm.clearAll();\n```\n\n### `get`\n\nRetrieves details about the specified alarm.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nconst name = \"test\";\n\nconst alarm = await Alarm.get(name);\nconsole.log(alarm);\n\n// Output: Object{ name: \"test\", periodInMinutes: 1, scheduledTime: 1706435598914.826 }\n```\n\n### `getAll`\n\nGets an array of all the alarms.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nconst alarms = await Alarm.getAll();\nconsole.log(alarms);\n\n// Output: Array[{ name: \"test\", periodInMinutes: 1, scheduledTime: 1706435598914.826 }]\n```\n\n### `onAlarm`\n\nFired when an alarm has elapsed. Useful for event pages.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nAlarm.onAlarm((alarm) =\u003e {\n  console.log(alarm);\n});\n\n// Output: Object{ name: \"test\", periodInMinutes: 1, scheduledTime: 1706435598914.826 }\n```\n\n## Link\n\n- [chrome.alarms](https://developer.chrome.com/docs/extensions/reference/api/alarms)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryohidaka%2Fchrome-alarms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryohidaka%2Fchrome-alarms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryohidaka%2Fchrome-alarms/lists"}