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

workwonders-sdk

v0.4.6

Published

This document explains how to install and use the `workwonders-sdk` in your web application. The SDK is a browser-focused widget SDK that exposes feedback and changelog widgets for your organization.

Readme

Work Wonders SDK

This document explains how to install and use the workwonders-sdk in your web application. The SDK is a browser-focused widget SDK that exposes feedback and changelog widgets for your organization.

Installation with npm package

  • Using npm
npm install workwonders-sdk
  • Using pnpm
pnpm add workwonders-sdk
  • Using yarn
yarn add workwonders-sdk

Importing and initializing

The main export is the WorkWonders class. Create an instance and call init with your organization information.

import { WorkWonders } from "workwonders-sdk";

const workwonders = new WorkWonders();

await workwonders.init({
  organization: "your-org-slug",
  token: "optional-jwt-token",
  locale: "en",
});
  • organization : required, your organization slug in WorkWonders.

  • token: optional, but required for private organizations.

  • locale: optional; if omitted, the SDK will pick a supported language based on your organization configuration.

After the init call is made, you will be able to initialize the feedback and changelog modules.

Global usage via <script> tag

If you are not using a bundler, you can load the SDK as a browser script.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>WorkWonders SDK Example</title>
    <script src="https://sdk.workwonders.app/sdk.js"></script>
  </head>
  <body>
    <h1>WorkWonders SDK Example</h1>
    <script>
      const workwonders = new window.WorkWonders();
      workwonders
        .init({
          organization: "your-org-slug",
          token: "optional-jwt-token",
          locale: "en",
        })
        .then(() => {
          console.log("WorkWonders SDK initialized");
        });
    </script>
  </body>
</html>

Feedback widget

import { WorkWonders } from "workwonders-sdk";

const workwonders = new WorkWonders();

await workwonders.init({
  organization: "your-org-slug",
  token: "optional-jwt-token",
  locale: "en",
});

workwonders.feedback.initFeedbackWidget();

This will add a button that will be attached to the right side of your application.

You can customize the text of the button in this page of your organization dashboard. More customization option are planned for the future.

Custom trigger for opening feedback

If you want to control the trigger yourself (for example, using your own button), call initFeedbackWidget with useCustomTrigger: true and then call openFeedbackWidget.

workwonders.feedback.initFeedbackWidget({ useCustomTrigger: true });

const button = document.getElementById("open-feedback");

button?.addEventListener("click", () => {
  workwonders.feedback.openFeedbackWidget();
});

Alternatively, you can also use the SDK’s built-in click listener by adding a data attribute to any element:

<button data-open-workwonders-feedback>Give feedback</button>

Listening for feedback events

You can listen to FeedbackModule events:

workwonders.feedback.on("postSubmitted", () => {
  console.log("Feedback post submitted");
});

Changelog widget

import { WorkWonders } from "workwonders-sdk";

const workwonders = new WorkWonders();

await workwonders.init({
  organization: "your-org-slug",
  token: "optional-jwt-token",
  locale: "en",
});

await workwonders.changelog.initChangelogWidget();

This will create the changelog view in your application and check if there is already some changelog that should be shown to the user.

You can also manually show some changelog using their ids:

workwonders.changelog.showChangelogs([1, 2, 3]);

Or manually close the changelogs view :

workwonders.changelog.closeChangelogWidget();

Mini changelog widget

workwonders.changelog.initChangelogWidgetMini();

This widget shows the last published changelogs in a list, and allows users to click and open the desired changelog

You can open the mini widget programmatically:

workwonders.changelog.openChangelogMiniWidget();

Or you can rely on the global click listener and data attributes:

<button data-open-workwonders-changelog-mini>What’s new</button>

To close the mini widget:

workwonders.changelog.closeChangelogMiniWidget();

Context-based changelogs and SPA navigation

The SDK supports context-based changelogs, which can be shown automatically based on:

  • The current URL.
  • Optional CSS selectors for clicked elements.

On initialization, the SDK already evaluates the current context. For single-page applications, call notifyUrlChange whenever your route changes so that context-based changelogs can be re-evaluated.

import { WorkWonders } from "workwonders-sdk";

const workwonders = new WorkWonders();

await workwonders.init({
  organization: "your-org-slug",
  token: "optional-jwt-token",
  locale: "en",
});

function onRouteChange() {
  workwonders.notifyUrlChange();
}