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

@supportwire/messenger-js-sdk

v1.0.32

Published

Drop-in replacement for @intercom/messenger-js-sdk that mounts a SupportWire widget.

Readme

@supportwire/messenger-js-sdk

Drop-in replacement for @intercom/messenger-js-sdk that mounts a SupportWire widget.

Ships two ways with one identical signatureSupportWire(settings) to boot, plus methods (update, show, hide, shutdown, …):

  • Node module (bundler / npm) — import SupportWire from '…'.
  • CDN script tag (no build step) — load the IIFE; the same API lives on window.SupportWire.

Install

Node module (npm)

npm install @supportwire/messenger-js-sdk
import SupportWire from '@supportwire/messenger-js-sdk';

SupportWire({
  app_id: 'your-supportwire-widget-slug',
  user_id: currentUser.id,
  email: currentUser.email,
  user_hash: currentUser.supportwireHash,
  name: currentUser.name,
});

Importing the package has no side effects — nothing is registered until you call it. The default export can be imported under any name (see the Intercom migration diff below).

CDN (script tag)

Load the IIFE bundle. window.SupportWire exposes the same signature as the node module — call it with settings to boot, then use its methods:

<script src="https://assets.supportwire.ai/supportwire/widget.js"></script>
<script>
  SupportWire({
    app_id: 'your-supportwire-widget-slug',
    user_id: 'CURRENT_USER_ID',
    email: 'CURRENT_USER_EMAIL',
    user_hash: 'CURRENT_USER_HMAC',
  });
  // SupportWire.update({ email: '[email protected]' });
  // SupportWire.show();  SupportWire.hide();  SupportWire.shutdown();
</script>

This is exactly the node-module API on windowSupportWire(settings) is the default export, SupportWire.update / .show / … are the named exports. Nothing Intercom-namespaced is touched, so it never collides with a real Intercom snippet on the same page.

Load the script synchronously (no async/defer) so window.SupportWire exists before your inline SupportWire({...}) call runs.

The bundle is also served from npm CDNs: https://unpkg.com/@supportwire/messenger-js-sdk / https://cdn.jsdelivr.net/npm/@supportwire/messenger-js-sdk.

If you're migrating an existing Intercom integration, default imports can be renamed at the import site — no other code change required:

- import Intercom from '@intercom/messenger-js-sdk';
+ import Intercom from '@supportwire/messenger-js-sdk';

  Intercom({
-   app_id: 'your-intercom-app-id',
+   app_id: 'your-supportwire-widget-slug',
    user_id: currentUser.id,
    email: currentUser.email,
-   user_hash: currentUser.intercomHash,
+   user_hash: currentUser.supportwireHash,
    name: currentUser.name,
  });

What's the app_id?

For SupportWire, app_id is your widget slug — the opaque, lowercase alphanumeric identifier shown next to each widget in the admin panel at /settings/widgets. Each widget is owned by one organization. Your backend resolves the org from the widget slug; you do not need to send a separate org identifier.

Identity & HMAC

When identity verification is enabled on your organization, send a user_hash computed server-side. The HMAC subject is user_id ?? email — i.e. when user_id is present it wins, otherwise the (lowercased, trimmed) email is signed.

import crypto from 'node:crypto';
const subject = currentUser.id ?? currentUser.email.trim().toLowerCase();
const userHash = crypto
  .createHmac('sha256', SUPPORTWIRE_HMAC_SECRET)
  .update(subject)
  .digest('hex');

Supported methods

| Method | Status | |---|---| | Intercom(settings) / boot(settings) | ✅ | | update(settings) | ✅ | | shutdown() | ✅ | | show() / hide() | ✅ | | showNewMessage(content?) | ✅ (opens widget + sends content if supplied) | | onShow(cb) / onHide(cb) / onUnreadCountChange(cb) / onUserEmailSupplied(cb) | ✅ | | getVisitorId() / whoami() | ⚠️ returns null for now | | trackEvent(name, metadata?) | ⚠️ no-op + warn until backend endpoint ships | | hideNotifications(hidden) | ⚠️ no-op + warn | | startTour / showArticle / showNews / startSurvey / startChecklist / showTicket / showConversation / showSpace / showMessages | ⚠️ no-op + warn (no SupportWire equivalent) |

Differences from Intercom

  • The product surface is smaller (no tours/articles/news/surveys). Those methods are silent no-ops so existing call sites don't throw.
  • getVisitorId() is synchronous in Intercom; ours returns null until an async fallback is added.
  • We never touch window.Intercom. The node module keeps its queue stub on window.SupportWireMessenger; the CDN build installs window.SupportWire. Both can coexist with a live Intercom snippet during migration.