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

launchable

v1.1.0

Published

All the shared logic and helpers used by Launchable Studio

Readme

Launchable

NPM Bundle

All the Javascript shared logic and helpers used by Launchable Studio.

Installation

npm install launchable

yarn add launchable

Usage

cx(className, conditionals)

Generates a string of class names based on the provided base class name and a set of conditional class names.

We use it to conditionally style elements.

// returns "base-class conditional-class-1 conditional-class-3"
cx("base-class", {
  "conditional-class-1": true,
  "conditional-class-2": false,
  "conditional-class-3": true,
});

dateFromNow(date)

Calculates the distance between the current date and the provided date.

// returns "5 days ago"
dateFromNow("2022-03-01");
// returns "2 months ago"
dateFromNow("2022-01-06");

defined(value)

Checks if a value is defined and not null.

We use it to conditionally render elements even when the value is an empty string or 0.

// returns true
defined(0);

// returns true
defined("");

// returns false
defined(undefined);

formatNumber(number)

Formats a number by inserting commas as thousand separators.

We use it to format large numbers in analytics stats, etc.

const num = 1234567890;
const formattedNum = formatNumber(num);
console.log(formattedNum); // Outputs: "1,234,567,890"

nullify(value)

Checks if the provided value is an empty string. If it is, it returns null; otherwise, it returns the original value.

We use it to prevent empty values in a nullable database column.

// returns null
nullify("");

// returns "Hello, World!"
nullify("Hello, World!");

Creating docs:

  1. Open this repository in Cursor.
  2. Type ⌘K and paste "Create a brief documentation for docs of how to use with examples".
  3. Paste the output here.