New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@andreasnicolaou/browser-notifier

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@andreasnicolaou/browser-notifier

A lightweight, RxJS-based browser notification library with permission handling, auto-dismiss, delay and event callbacks.

unpublished
latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
0
Created
Source

Logo

WebPushNotifier

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.

Features

  • Show browser notifications with customizable options.
  • Auto-dismiss notifications after a set of time (optional).
  • Delay notifications after a set of time (optional).
  • Handle click, close and permission denied events with callbacks.
  • Gracefully manage notification permissions.

Installation

npm install @andreasnicolaou/browser-notifier

Usage

import { WebPushNotifier } from '@andreasnicolaou/browser-notifier';

const webPushNotifier = new WebPushNotifier({ autoDismiss: 5000 });
webPushNotifier.show('Hello there!', { body: 'This is a test notification using @andreasnicolaou/browser-notifier.' });

API

new WebPushNotifier(globalOptions?: WebPushNotifierOptions, globalCallbacks?: WebPushNotifierCallbacks)

Creates a new notification handler with optional default settings.

  • globalOptions: Default notification options.
  • globalCallbacks: Default callbacks for notification events.
.show(title: string, options?: WebPushNotifierOptions, callbacks?: WebPushNotifierCallbacks): Observable<Notification | null>

Creates & Displays the notification.

  • title: The title of the notification.
  • options: Notification options (optional).
  • callbacks: Callbacks for notification events (optional).
  • Returns an Observable that emits the notification instance if successful.
.dismissAll(): void

Closes all active notifications.

Learn more about the Notification API

  • Notification API - MDN
  • Browser Compatibility - MDN

Keywords

browser

FAQs

Package last updated on 15 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts