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

@splithub/core

v0.5.1

Published

The heart of SplitHub: the config, who sees which variant, and the event queue for experiments and analytics, on websites and in apps (screens, offline queue, app targeting). No framework, no dependencies.

Readme

@splithub/core

Framework-agnostic core of SplitHub: defineConfig, deterministic assignment (MurmurHash3), visitor id, event queue and a tiny client.

import { defineConfig, createClient } from '@splithub/core';

const config = defineConfig({ project: 'app', storage: { mode: 'self', endpoint: '/api/splithub' }, experiments: { ... } });
const client = createClient(config);           // browser: reads/writes the sh_vid cookie
client.variant('hero-cta');                    // 'control' | 'bold', records an exposure
client.value<string>('hero-title');
client.track('signup', { revenue: 49 });        // an event, any name; converts experiments whose goal it is

In cloud mode the client also applies remote overrides (pause, traffic, weights, value payloads changed without a deploy): the cached copy from localStorage is applied synchronously on page load, a fresh copy is fetched in the background for the next load. Assignments never change mid-page.

In an app

Outside the browser, give the client a platform adapter instead of a page: a synchronous storage, the app's info and its lifecycle.

import { createClient, memoryStorage } from '@splithub/core';

const client = createClient(config, {
  platform: {
    storage: memoryStorage(),                 // any sync getItem / setItem / removeItem store
    app: { platform: 'ios', id: 'com.acme.shop', version: '2.4.1' },
    onBackground: (cb) => appState.on('background', cb), // flush when the app hides
    onForeground: (cb) => appState.on('foreground', cb), // new session after 30 minutes away
  },
});
client.screen('Settings');                    // a pageview of /Settings

With an adapter the client keeps the visitor in storage, sends pageviews only from screen(), and keeps unsent events on the device (up to 1,000) until the network is back. Experiments can target the app with the platform and app_version fields; app_version takes gte / lt and compares part by part (2.10.0 is after 2.9).

Use @splithub/react in React apps and @splithub/react-native in React Native and Expo apps. Native apps have their own SDKs for iOS (Swift) and Android (Kotlin) in the splithub-sdk repository. Use this package directly for vanilla JS, other frameworks, server-side assignment, or traffic simulation.