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

mpn-lookup

v1.1.2

Published

A TypeScript library for Most Probable Number (MPN) lookups in microbiological testing, supporting QuantiTray, QuantiTray2000, and Legionella formats

Readme

mpn-lookup

A simple tool for when you don't want to use, or simply can't find, the various reference PDF's for the QuantiTray system.

Built with:
Mocha Chai TS Node ESLint Prettier

For the work I used the following tools:

Intellij VSCode Cursor Claude

Installation

npm install mpn-lookup
# or
pnpm add mpn-lookup
# or
yarn add mpn-lookup

Quick Start

import { getQtMpn, getQt2KMpn, getQtLegio } from 'mpn-lookup';

// Standard QuantiTray lookup (0-51 positive wells)
const result = getQtMpn(10);
if (result) {
  const [lower, estimate, upper] = result;
  console.log(`MPN: ${estimate} (${lower} - ${upper})`);
  // Output: MPN: 5.3 (2.3 - 12.3)
}

// QuantiTray 2000 lookup (large pos: 0-49, small pos: 0-48)
const result2k = getQt2KMpn(10, 25);
if (result2k) {
  const [lower, estimate, upper] = result2k;
  console.log(`2K MPN: ${estimate} (${lower} - ${upper})`);
}

// Legionella lookup (large pos: 0-6, small pos: 0-90)
const legioResult = getQtLegio(3, 45);
if (legioResult !== undefined) {
  console.log(`Legionella MPN: ${legioResult}`);
}

API Reference

getQtMpn(positiveWells: number): MpnResult | undefined

Returns MPN values for standard QuantiTray testing.

  • positiveWells: Number of positive wells (0-51)
  • Returns: [lowerBound, estimate, upperBound] tuple or undefined for invalid inputs

getQt2KMpn(largePos: number, smallPos: number): MpnResult | undefined

Returns MPN values for QuantiTray 2000 high-throughput testing.

  • largePos: Large position index (0-49)
  • smallPos: Small position index (0-48)
  • Returns: [lowerBound, estimate, upperBound] tuple or undefined for invalid inputs

getQtLegio(largePos: number, smallPos: number): string | number | undefined

Returns MPN values for Legionella testing.

  • largePos: Large position index (0-6)
  • smallPos: Small position index (0-90)
  • Returns: Single MPN value or undefined for invalid inputs

Development

# Clone and setup
git clone https://github.com/jonathan-gartland/mpn-lookup.git
cd mpn-lookup
pnpm install

# Run tests
pnpm test

# Build library
pnpm build

# Run all checks (lint, type-check, test)
pnpm run check-all

Example use in REPL:

MPN Output Example
MPN Examples

Example Apps that uses the mpn-lookup library

https://github.com/jonathan-gartland/mpn-lookup-nextjs
https://github.com/jonathan-gartland/MpnLookupRN