npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@symplify.com/webpush

v0.0.2

Published

## What is it and what can I use it for? Symplify Web Push messaging enables you to Pop Up when your customer is on site. You can for example use Symplify Web Push to inform selected customers that they have an active offer available, tips and tricks with

Readme

Symplify Web Push

What is it and what can I use it for?

Symplify Web Push messaging enables you to Pop Up when your customer is on site. You can for example use Symplify Web Push to inform selected customers that they have an active offer available, tips and tricks within the platform or showcasing features based on the recipient profile.

You can of course personalize all messages and use the different Symplify modules, like Journeys and Campaigns to generate your Symplify Web Push messages.

  • Create welcome messages for new users with link and instructions for navigating the app or best use the application
  • Send a reminder that pops up after login so they remember to complete their registration with credit card, loyalty card and shipping address etc.
  • Showcase new features and encourage users to try them out
  • Send coupons and offers
  • Remind customers of abandoned carts or loyalty credits on their accounts
  • Offer order tracking after sales

How to identify the recipient

We need a secret identifier that is used when connecting to the Symplify Web Push service. The secret is a securely hashed signature created by calling our REST API with the id of your contact. If the contact is present in any of your lists in Symplify, we will return a hash which you can use to connect to the contact's inbox.

NOTE: Since communicating with our REST API is done on the server side, this will require some development on your side. Read about using our API here

A basic usage pattern is:

  • The user logs in to your site.
  • Once you know the id of your user, call our user hash resource.
  • Cache the user hash in your web server session storage or in your database.
    • Do not call the user hash resource for every page.
    • User hashes are valid for 90 days.
  • Include the script on pages where Symplify Web Push messages should be displayed.

Secure user hashes are generated using the REST resource /webpush.

POST /rest/{customerid}/webpush
{
  "contactId": "the id of the user in your database", (originalId in Symplify)
  "privacyLevel": "SENSITIVE|NOT_SENSITIVE" (defaults to SENSITIVE)
}

An example response would look like

{
  "userHash": "e94187765acfe001e415107c68f6a6fd5e74b66042145fe28609787b2e881b67"
}

Install

npm install @symplify.com/webpush

or

yarn add @symplify.com/webpush

API

Types:

interface Message {
  id: string;
  userId: string;
  hasBeenRead: boolean;
  subject: string;
  body?: string;
  loadBody: () => void;
  deleteMessage: () => void;
  markRead: () => void;
}

Methods:

start(userHash: string): void

stop(): void

subscribeToPush(): void

unsubscribeFromPush(): void

isPushDisabled(): boolean

onIncomingMessage(callback: (message: Message) => void): void

offIncomingMessage(callback: (message: Message) => void): void

onMessage(callback: (messages: Message[]) => void): void

offMessage(callback: (messages: Message[]) => void): void