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

@spare.io-organization/sdk

v1.0.2

Published

Tracking tool SDK for the Spare project

Readme

@spare.io-organization/sdk

Usage

CDN

Put the script into the head section of your website:

<script src="https://unpkg.com/@spare.io-organization/[email protected]/umd/sdk.min.js"></script>

The script must be included to all of the pages you specify when creating/editing products on the spare.io platform to be able to track the number of visitors coming from a particular Ad.

To track purchases, call the following script when a purchase occurs:

__spare.purchase({price: 99.99});

The price value (eg. 99.99) is used to properly calculate revenue and other metrics displayed on the Ad Manager page.

You can find an example below that shows how it can look in HTML code of your page:

<h1>Product title</h3>
<button onclick="__spare.purchase({price:99, orderId: 123})">Buy</button>

If you are using HTML forms for purchases you need to register purchaseWithForm in a head section of your app and specify id of the target form as shown below:

<head>
  ...
  <script src="https://unpkg.com/@spare.io-organization/[email protected]/umd/sdk.min.js"></script>
  <script>
    __spare.purchaseWithForm("buy-form", {price: 1100, orderId: 123});
  </script>
</head>
<body>
  <form id="buy-form" action="/buy" method="post">
    ...
    <button type="submit">Buy</button>
  </form>
</body>

ESM

There is also an option to use the package in ES modules format.

The __spare instance will not be accessible globally from a window object when using ES modules

Install package with npm or yarn

npm install @spare.io-organization/sdk
import {init} from "@spare.io-organization/sdk";

// Track info about purchase
spare.purchase({
  price: 99.99,
  orderId: 123
});

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Live updates with wml

You might need to debug your code if you are going to contribute to this package.

There is a WML tool that will allow you to to perform live mapping of library into the node_modules of the dependent project.

# You need to add a link only once
wml add ./ ~/dependent-project/node_modules/@spare.io-organization/sdk

wml start

License

MIT License