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

@1sygnal/onesygnal-web-sdk

v1.0.8

Published

1Sygnal Web SDK — thin loader + CDN-hosted survey engine

Readme

1Sygnal Web SDK

Website · Documentation

Thin loader + CDN-hosted survey engine for 1Sygnal in-product surveys, event tracking, and user identification.

Installation

npm

npm install @1sygnal/onesygnal-web-sdk
import oneSygnal from '@1sygnal/onesygnal-web-sdk';

oneSygnal.init('your-api-key', { apiUrl: 'https://sdk-api.1sygnal.app' });

The package has a default export only — there's no { init, track, identify } named export.

Script tag (auto-init)

<script
  src="https://repo.1sygnal.app/js/1sygnal.js"
  data-api-key="your-api-key"
  data-api-url="https://sdk-api.1sygnal.app"
></script>

Usage

Tracking events

oneSygnal.track('button_click', { id: 'cta' });

Identifying users

oneSygnal.identify('user-123', { plan: 'pro' });

Also available: oneSygnal.logout() to clear session/user state, and oneSygnal.setSurveysEnabled(enabled) to toggle surveys at runtime.

Listening for survey events

oneSygnal.on('survey:completed', (event) => {
  // handle completion
});

Other available events: "survey:shown", "survey:step", "survey:dismissed". Unsubscribe with oneSygnal.off(event, callback).

How it works

init() returns void, not a Promise — it injects a <script> tag that loads the full SDK bundle from 1Sygnal's CDN, and queues track/identify/on/etc. calls until that bundle loads and signals readiness. There's nothing to await; calls made before the bundle is ready are queued and replayed once it is. This lets survey-triggering fixes and features ship to every embedded site immediately, without a dependency bump and redeploy.

Mobile safe-area insets

Bottom/top-anchored surveys use env(safe-area-inset-*) to clear notches and the home indicator on phones. Those env() values only resolve once the page opts in via:

<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">

init() patches this in automatically (appending viewport-fit=cover to an existing <meta name="viewport">, or adding one if the page has none), so this is a fallback, not a hard requirement — but setting it yourself in the page <head> is still recommended, since it takes effect before the SDK loads.

Docs

Full integration guide: https://docs.1sygnal.app

Other SDKs