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

@netlify/activity-hub

v1.1.2

Published

To keep track of activity across multiple Netlify properties, we need a centralized place where we can store activity.

Readme

Netlify User Activity Aggregation

To keep track of activity across multiple Netlify properties, we need a centralized place where we can store activity.

This activity is used to track progress (e.g. how much of an educational resource has been completed), determine whether someone has completed the steps to earn a community badge or other bonuses, benefits, or bragging rights.

This module is a write-only helper that makes sending activity data to the central service as painless as possible.

Installation

npm i @netlify/activity-hub

Usage

This app assumes you’ve already authenticated the user and that you have their Netlify user ID. If you need to get this, you can use Netlify OAuth and the Netlify API to retrieve it.

import netlifyActivityHub from '@netlify/activity-hub';

// this is pseudo-code; your app needs to provide the user object
const user = getNetlifyUser()

const sendActivity = netlifyActivityHub({  
  userId: user.id,
  app: "your-app-name", // use the same app name everywhere in your app
});

// whenever you want to send activity, call `sendActivity`
document.querySelector('button').addEventListener('click', () => {
  sendActivity('button-click', {
    page: window.location.pathname,
  })
});

API

netlifyActivityHub

The main function exported by @netlify/activity-hub accepts global config and returns a function that will send activity to the Activity Hub.

import netlifyActivityHub from '@netlify/activity-hub';

// see the next section for the config object’s shape
const sendActivity = netlifyActivityHub(config);

| property | type | description | | -------- | -------- | -------------------------------------------------------------------------- | | userId | string | a Netlify user ID, as returned from the Netlify API | | app | string | a unique identifier for your app. this can be used to group activity later |

sendActivity

The function returned from netlifyActivityHub accepts an event type as a string, and an object full of arbitrary data to track whatever details you want about the activity.

sendActivity(type, data);

| property | type | description | | -------- | -------- | -------------------------------------------------------------------------- | | type | string | any string to identify the activity type (e.g. start-playback) | | data | object | any JSON.stringify-able data in an object that can be attached to the activity |

NOTE: don’t store any personally identifying data in the data object