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

activitypub-helper

v0.3.4

Published

ActivityPub Helper

Readme

Activity Pub helper

TypeScript BunJS Parcel

Version

Install

# npm
npm install activitypub-helper
# yarn
yarn add activitypub-helper
# pnpm
pnpm add activitypub-helper
# bun
bun add activitypub-helper

Vocabulary from

  • https://www.w3.org/TR/activitypub/
  • https://www.w3.org/ns/activitystreams
  • https://www.w3.org/TR/activitystreams-vocabulary/

Usage

.well-known/webfinger

Must be /.well-known/webfinger endpoint

Others should request you to /.well-known/webfinger?resource=acct:${username}@${host}
or ...?resource=acct:@${username}@${host}

import { WebFinger } from 'activitypub-helper/.well-known'

const webfinger = new WebFinger('yodangang.express', 'authorize_interaction')
const { id, host } = webfinger.parseAcct('acct:[email protected]') // or acct:@[email protected]
// => { id: 'juunini', host 'yodangang.express' }

const response = webfinger.response(
  id,
  '7bb45d5a-6222-423a-afdc-154e6ae7951a' // optional. if has different id for Database primary key
)
response.links.push({
  "rel": "http://ostatus.org/schema/1.0/subscribe",
  "template": "https://yodangang.express/authorize-follow?acct={uri}"
})
// {
//   subject: 'acct:juunini@yodangang-express',
//   aliases: ['https://yodangang-express/@juunini', 'https://yodangang-express/users/7bb45d5a-6222-423a-afdc-154e6ae7951a'],
//   links: [
//     {
//       rel: 'http://webfinger.net/rel/profile-page',
//       type: 'text/html',
//       href: 'https://yodangang-express/@juunini'
//     },
//     {
//       rel: 'self',
//       type: 'application/activity+json',
//       href: 'https://yodangang-express/users/7bb45d5a-6222-423a-afdc-154e6ae7951a'
//     },
//     {
//       rel: 'http://ostatus.org/schema/1.0/subscribe',
//       template: 'https://yodangang.express/authorize-follow?acct={uri}'
//     }
//   ]
// }

new Response(JSON.stringify(response), {
  headers: {
    'Content-Type': WebFinger.CONTENT_TYPE,
  }
})

.well-known/nodeinfo

Must be /.well-known/nodeinfo endpoint

import { NodeInfo } from 'activitypub-helper/.well-known'

const nodeinfo = new NodeInfo('yodangang.express'/*, '2.1' */) // version is optional. default is 2.0
const response = nodeinfo.response()
// {
//   links:[
//     {
//       rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0',
//       href: 'https://yodangang.express/nodeinfo/2.0'
//     }
//   ]
// }

new Response(JSON.stringify(response), {
  headers: {
    'Content-Type': NodeInfo.CONTENT_TYPE,
  }
})

nodeinfo

Must be /nodeinfo/${version} endpoint

import { NodeInfo } from 'activitypub-helper/nodeinfo'

const nodeinfo = new NodeInfo({
  version: '2.0', // optional
  software: {
    name: 'misskey',
    version: '13.14.2'
  },
  protocols: ['activitypub'], // optional
  services: { inbound: [], outbound: [] }, // optional
  openRegistrations: false, // optional
  usage: {
    users: {
      total: 1,
      activeHalfyear: 1,
      activeMonth: 1
    },
    localPosts: 10,
    localComments: 43
  },
  metadata: {} // optional
})
const response = nodeinfo.response()
// {
//   version: '2.0',
//   software: {
//     name: 'misskey',
//     version: '13.14.2'
//   },
//   protocols: ['activitypub'],
//   services: { inbound: [], outbound: [] },
//   openRegistrations: false,
//   usage: {
//     users: {
//       total: 1,
//       activeHalfyear: 1,
//       activeMonth: 1
//     },
//     localPosts: 10,
//     localComments: 43
//   },
//   metadata: {}
// }

new Response(JSON.stringify(response), {
  headers: {
    'Content-Type': NodeInfo.CONTENT_TYPE,
  }
})