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

@namiml/web-sdk

v3.4.8

Published

Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web

Readme

Nami SDK logo

Nami Web SDK

Nami is easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.

This library helps you easily offer in-app purchases and subscriptions.

  • No IAP code to write.
  • Focus on your app experience.
  • All edge cases are handled and no server is required.
  • Includes is powerful built-in paywalls templates
  • Update paywalls easily using a browser-based paywall CMS.
  • Conduct paywall A/B tests, to improve your conversion rate.
  • Robust subscription analytics, webhooks, and much more.

Requires an account with Nami ML. See https://www.namiml.com/pricing for more details and to create a free account.

Getting started with Nami's Web SDK

Install the Web SDK in your project

You can install the SDK via NPM or Yarn

npm install @namiml/web-sdk --save
yarn add @namiml/web-sdk

Example apps showing how to use the SDK are available in our Nami Web SDK repo.

More information on configuring and using the SDK is available in our docs at https://learn.namiml.com.

Testing

Unit tests live in tests/unit/ and mirror the src/ directory structure. Run them with:

yarn test

Test infrastructure

The suite uses two transformers side-by-side, each with a distinct role:

| Tool | Role | What it handles | |---|---|---| | ts-jest | TypeScript transformer | All .ts test files and source files — compiles TypeScript to CommonJS for Jest | | babel-jest | JavaScript transformer | Third-party ESM packages from node_modules (Lit, @open-wc, @esm-bundle/chai, lodash-es, etc.) that Jest cannot run as-is because they ship as native ES modules | | @open-wc/testing | Web Component test utilities | fixture() for rendering Lit components into a real jsdom DOM, elementUpdated() for awaiting Lit update cycles, and semantic DOM diff assertions (expect(el).dom.to.equal(…)) |

transformIgnorePatterns in jest.config.mjs lists the packages that babel-jest must transform (all others in node_modules are skipped). babel.config.jest.cjs configures the babel presets and plugins used for those transformations.

Strategy for new tests

  • Pure logic (services, repositories, utilities, managers): use ts-jest only. Import the class under test directly. No @open-wc/testing needed.
  • Web Components (anything in src/components/): use fixture() from @open-wc/testing to mount the component in jsdom and elementUpdated() to wait for Lit's render cycle before asserting. See any existing file in tests/unit/components/ for the pattern.
  • Do not add new packages to transformIgnorePatterns without also verifying that babel.config.jest.cjs can transform them. New ESM-only packages may require additional babel plugins.

Legacy support

To support older browsers, import our side-effect module before you import the SDK. It installs the necessary polyfills and shims, allowing the main entry point to stay the same for every app.

  • ESM:
    import '@namiml/web-sdk/legacy-support';
    import { Nami } from '@namiml/web-sdk';
  • CommonJS:
    require('@namiml/web-sdk/legacy-support');
    const { Nami } = require('@namiml/web-sdk');

Modern apps that do not target legacy environments can simply import the default entry:

import { Nami } from '@namiml/web-sdk';

This keeps the modern bundle slim, while letting you opt into additional support only when you need it.