Socket
Book a DemoInstallSign in
Socket

mpn-lookup

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpn-lookup

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

1.1.2
latest
Source
npmnpm
Version published
Weekly downloads
24
118.18%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

mpn

FAQs

Package last updated on 09 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.