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

exit-waterfall

v1.0.0

Published

Startup exit waterfall math — liquidation preference stacks (seniority/pari passu, Nx multiples), participating vs non-participating with caps, and the convert-or-not equilibrium. Zero dependencies.

Readme

exit-waterfall

Startup exit waterfall math — liquidation-preference stacks (seniority tiers or pari passu, Nx multiples), participating vs non-participating preferred with participation caps, and the convert-or-not equilibrium. Zero dependencies.

npm install exit-waterfall

Why

"We sold for $30M — who gets what?" is the question every founder, VC, and M&A model answers, and the answer hinges on mechanics that are easy to get wrong: senior preferences pay first; participating preferred double-dips until a cap binds; and every class implicitly chooses the better of its preference path or converting to common — a decision that depends on everyone else's decision. Every npm "waterfall" package is an async control-flow library. This one does the actual finance.

import { exitWaterfall } from "exit-waterfall";

const r = exitWaterfall({
  proceeds: 30_000_000,
  preferred: [
    { name: "Series B", shares: 1_500_000, invested: 6_000_000, seniority: 1 },
    { name: "Series A", shares: 2_000_000, invested: 2_000_000, seniority: 2,
      participating: true, participationCap: 2 },
  ],
  common: [{ name: "Common", shares: 6_500_000 }],
});

r.distributions;   // per-class: amount, converted?, fromPreference, fromParticipation, multiple
r.converted;       // which classes chose to convert
r.totalDistributed // always exactly === proceeds

Semantics

  • Preference: paid by seniority tier (lower number first); classes in the same tier share shortfalls pro-rata by preference amount. Multiple = invested × preferenceMultiple.
  • Participation: after preferences, common + converted classes + participating preferred share the residual pro-rata by shares. A participationCap (multiple of invested, total return) fixes a class at its cap, with the excess redistributed — iterated until stable.
  • Conversion equilibrium: each preferred class converts iff common treatment pays strictly more than its preference path, holding others fixed; iterated (monotone) to a fixed point. This produces the classic breakpoints — including a capped participating class abandoning its cap to convert at large exits.
  • Conservation: Σ distributions ≡ proceeds, enforced in tests across the whole range.

Related

Part of a cap-table math family: safe-stack-conversion · priced-round-math · vesting-schedule-math.

Author

Built by Moshe Malka — engineering leader in New York City. Studio work at Quentin.Code.

MIT © Moshe Malka