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

@86d-app/social-sharing

v0.0.40

Published

Social sharing and share tracking module for 86d commerce platform

Readme

[!WARNING] This project is under active development and is not ready for production use.

Social Sharing Module

📚 Documentation: 86d.app/docs/modules/social-sharing

Track share events and generate platform-specific share URLs for products, collections, pages, and blog posts across Twitter, Facebook, Pinterest, LinkedIn, WhatsApp, email, and copy-link.

Installation

npm install @86d-app/social-sharing

Usage

import socialSharing from "@86d-app/social-sharing";

const module = socialSharing({
  enabledNetworks: "twitter,facebook,pinterest",
  defaultHashtags: "shop,deals",
});

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabledNetworks | string | all networks | Comma-separated list of enabled networks | | defaultHashtags | string | none | Comma-separated default hashtags for shares |

Store Endpoints

| Method | Path | Description | |--------|------|-------------| | POST | /social-sharing/share | Record a share event | | GET | /social-sharing/count | Get share count for a target | | GET | /social-sharing/url | Generate a share URL |

Admin Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /admin/social-sharing | List share events | | GET | /admin/social-sharing/stats | Share statistics | | GET | /admin/social-sharing/top | Top shared content | | GET | /admin/social-sharing/settings | Get share settings | | POST | /admin/social-sharing/settings/update | Update share settings |

Controller API

interface SocialSharingController extends ModuleController {
  recordShare(params: { targetType: TargetType; targetId: string; network: Network; url: string; ... }): Promise<ShareEvent>;
  getShareCount(targetType: TargetType, targetId: string): Promise<number>;
  getShareCountByNetwork(targetType: TargetType, targetId: string): Promise<Record<string, number>>;
  listShares(params?: { targetType?: TargetType; network?: Network; ... }): Promise<ShareEvent[]>;
  getTopShared(params?: { targetType?: TargetType; take?: number }): Promise<Array<{ targetType: string; targetId: string; count: number }>>;
  getSettings(): Promise<ShareSettings | null>;
  updateSettings(params: { enabledNetworks?: Network[]; defaultMessage?: string; hashtags?: string[]; customTemplates?: Record<string, string> }): Promise<ShareSettings>;
  generateShareUrl(network: Network, targetUrl: string, message?: string, hashtags?: string[]): string;
}

Types

  • TargetType"product" | "collection" | "page" | "blog-post" | "custom"
  • Network"twitter" | "facebook" | "pinterest" | "linkedin" | "whatsapp" | "email" | "copy-link"
  • ShareEvent — Individual share tracking record with network and referrer
  • ShareSettings — Global settings for enabled networks, default message, hashtags, and per-network templates

Components

Store

  • ShareButtons — Social share button row for any target. Renders buttons for Twitter, Facebook, Pinterest, LinkedIn, WhatsApp, Email, and Copy Link. Records share events and shows total count. Requires targetType, targetId, url props.

Admin

  • SocialSharingAdmin — Admin dashboard with share stats by network, top shared content, recent events table (filterable by target type and network), and settings panel (enabled networks, default message, hashtags).

Notes

  • generateShareUrl is a synchronous method that builds platform-specific URLs (e.g., https://twitter.com/intent/tweet?url=...).
  • Settings use a singleton record with ID "global". First call to getSettings may return null if not yet configured.
  • getTopShared aggregates all share events in memory and sorts by count. For large datasets, consider pagination.
  • copy-link network returns the raw target URL from generateShareUrl.