{"id":26447179,"url":"https://github.com/andreasnicolaou/web-notifier","last_synced_at":"2026-05-01T01:32:29.159Z","repository":{"id":282598416,"uuid":"948893868","full_name":"andreasnicolaou/web-notifier","owner":"andreasnicolaou","description":"A lightweight and flexible web notification library that provides a simple API for handling browser notifications using RxJS observables. It allows you to request permission, display notifications, and handle user interactions in a reactive way.","archived":false,"fork":false,"pushed_at":"2026-04-06T08:36:12.000Z","size":1102,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T10:23:13.893Z","etag":null,"topics":[],"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/andreasnicolaou.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-15T07:37:33.000Z","updated_at":"2026-04-06T08:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"befe9ad3-bcde-4615-8c7f-90632e544ad5","html_url":"https://github.com/andreasnicolaou/web-notifier","commit_stats":null,"previous_names":["andreasnicolaou/web-notifier"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/andreasnicolaou/web-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnicolaou%2Fweb-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnicolaou%2Fweb-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnicolaou%2Fweb-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnicolaou%2Fweb-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasnicolaou","download_url":"https://codeload.github.com/andreasnicolaou/web-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnicolaou%2Fweb-notifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":[],"created_at":"2025-03-18T13:01:36.779Z","updated_at":"2026-05-01T01:32:29.144Z","avatar_url":"https://github.com/andreasnicolaou.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Notifications"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"Logo\"\u003e\n\u003c/p\u003e\n\n# WebPushNotifier\n\nA lightweight and flexible web notification library that provides a simple API for handling notifications using RxJS observables. It allows you to request permission, display notifications, and handle user interactions in a reactive way.\n\n## Features\n\n- Show web notifications with customizable options.\n- Auto-dismiss notifications after a set of time (optional).\n- Delay notifications after a set of time (optional).\n- Handle click, close and permission denied events with callbacks.\n- Gracefully manage notification permissions.\n\n## Installation\n\n```sh\nnpm install @andreasnicolaou/web-notifier\n```\n\n## CDN Usage\n\nYou can use the library directly in the browser via CDN. The UMD build exposes the global variable `webNotifier`.\n\n**unpkg CDN (latest, unminified):**\n\n```html\n\u003cscript src=\"https://unpkg.com/@andreasnicolaou/web-notifier/dist/index.umd.js\"\u003e\u003c/script\u003e\n```\n\n**unpkg CDN (latest, minified):**\n\n```html\n\u003cscript src=\"https://unpkg.com/@andreasnicolaou/web-notifier/dist/index.umd.min.js\"\u003e\u003c/script\u003e\n```\n\n**jsDelivr CDN (unminified):**\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@andreasnicolaou/web-notifier/dist/index.umd.js\"\u003e\u003c/script\u003e\n```\n\n**jsDelivr CDN (minified):**\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@andreasnicolaou/web-notifier/dist/index.umd.min.js\"\u003e\u003c/script\u003e\n```\n\n### Example: Using in the Browser\n\n```html\n\u003cscript src=\"https://unpkg.com/@andreasnicolaou/web-notifier/dist/index.umd.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  // Access the WebPushNotifier class from the global 'webNotifier' object\n  const Notifier = window.webNotifier.WebPushNotifier;\n  const notifier = new Notifier({ autoDismiss: 2000 });\n  notifier.show('Hello from CDN!', { body: 'This is a test notification.' });\n\u003c/script\u003e\n```\n\n## Usage\n\n```typescript\nimport { WebPushNotifier } from '@andreasnicolaou/web-notifier';\n\nconst webPushNotifier = new WebPushNotifier({ autoDismiss: 5000 });\nwebPushNotifier.show('Hello there!', { body: 'This is a test notification using @andreasnicolaou/web-notifier.' });\n```\n\n## API\n\n```sh\nnew WebPushNotifier(globalOptions?: WebPushNotifierOptions, globalCallbacks?: WebPushNotifierCallbacks)\n```\n\nCreates a new notification handler with optional default settings.\n\n- **globalOptions**: Default notification options.\n- **globalCallbacks**: Default callbacks for notification events.\n\n```sh\n.show(title: string, options?: WebPushNotifierOptions, callbacks?: WebPushNotifierCallbacks): Observable\u003cNotification | null\u003e\n```\n\nCreates \u0026 Displays the notification.\n\n- **title**: The title of the notification.\n- **options**: Notification options (optional).\n- **callbacks**: Callbacks for notification events (optional).\n- Returns an Observable that emits the notification instance if successful.\n\n```sh\n.dismissAll(): void\n```\n\nCloses all active notifications.\n\n## Learn more about the Notification API\n\n- [Notification API - MDN](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n- [Browser Compatibility - MDN](https://developer.mozilla.org/en-US/docs/Web/API/Notification#browser_compatibility)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasnicolaou%2Fweb-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasnicolaou%2Fweb-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasnicolaou%2Fweb-notifier/lists"}