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

@tungstenstudio/outschart-generator

v1.0.0

Published

Darts outs/checkout chart generator with pre-computed lookups and a miss-aware recommendation engine

Readme

@tungstenstudio/outschart-generator

Darts outs/checkout chart generator with pre-computed lookups and a miss-aware recommendation engine.

Live Demo

Features

  • Instant lookups — pre-computed double-out and single-out charts, zero computation
  • Generation engine — brute-force enumerate all possible checkouts (82K double-out, 242K single-out)
  • Miss-aware recommendations — scoring algorithm using physical dartboard layout, segment areas, and bust risk
  • Notation presets — format charts for different regional conventions (british, american, or custom)
  • Zero dependencies — pure TypeScript, works in Node.js and browsers

Install

npm install @tungstenstudio/outschart-generator

Quick Start

import { getCheckout, getCheckoutChart, getBogeyNumbers } from '@tungstenstudio/outschart-generator';

// Instant lookup
getCheckout(170, 'double');
// { darts: ['T20', 'T20', 'Bull'], numDarts: 3 }

getCheckout(40, 'double');
// { darts: ['D20'], numDarts: 1 }

// Full chart
const chart = getCheckoutChart('double');

// Bogey numbers (no checkout possible)
getBogeyNumbers('double');
// [159, 162, 163, 165, 166, 168, 169]

API

Lookup Functions (pre-computed, instant)

getCheckout(score, outMode?)

Returns the recommended checkout for a single score, or null if not checkable.

getCheckout(92, 'double')
// { darts: ['T20', 'D16'], numDarts: 2 }

getCheckoutChart(outMode?, range?)

Returns the full checkout chart, optionally filtered by score range.

getCheckoutChart('single', { min: 1, max: 60 })

getBogeyNumbers(outMode?)

Returns scores that cannot be finished in 3 darts.

isCheckable(score, outMode?)

Returns true if the score has a checkout in the pre-computed chart.

Generation Engine (computational)

generateAllCheckouts(options)

Brute-force enumerates ALL possible checkouts.

const result = generateAllCheckouts({ outMode: 'double' });
// result.totalOptions === 82047
// result.checkouts[170].options === [['T20', 'T20', 'Bull']]

generateRecommended(options)

Generates a miss-aware recommended chart using the scoring algorithm.

const result = generateRecommended({
  outMode: 'single',
  includeAlternates: true,
  altThreshold: 1.0,
  overrides: { 100: { darts: ['T20', '20', '20'] } },
});

Notation / Internationalization

formatDart(dart, notation)

Formats a single dart label using a notation preset or custom map.

import { formatDart, NOTATIONS } from '@tungstenstudio/outschart-generator';

formatDart('T20', NOTATIONS.british)  // 'T20'
formatDart('Bull', NOTATIONS.british) // 'DB'
formatDart('25', NOTATIONS.american)  // 'SB'
formatDart('20', NOTATIONS.explicit)  // 'S20'

formatCheckoutChart(chart, notation)

Formats an entire checkout chart. Accepts a preset name string or a NotationMap object.

import { getCheckoutChart, formatCheckoutChart } from '@tungstenstudio/outschart-generator';

const chart = getCheckoutChart('double');

// Use a built-in preset by name
const british = formatCheckoutChart(chart, 'british');
british[170].darts // ['T20', 'T20', 'DB']

// Use a fully custom notation
const custom = formatCheckoutChart(chart, {
  treble: 'Triple ',
  double: 'Double ',
  single: '',
  bull: 'Bullseye',
  outerBull: 'Outer Bull',
});
custom[170].darts // ['Triple 20', 'Triple 20', 'Bullseye']

NOTATIONS

Built-in notation presets:

| Preset | Treble | Double | Single | Bull | 25 | |--------|--------|--------|--------|------|------| | default | T20 | D20 | 20 | Bull | 25 | | british | T20 | D20 | S20 | DB | SB | | american | T20 | D20 | 20 | DB | SB | | explicit | T20 | D20 | S20 | Bull | 25 |

Utilities

parseTarget(str)

Parses dart notation into components.

parseTarget('D16') // { bed: 'double', number: 16, value: 32 }
parseTarget('T20') // { bed: 'treble', number: 20, value: 60 }
parseTarget('Bull') // { bed: 'Bull', number: null, value: 50 }

formatTarget(bed, number)

Inverse of parseTarget — formats a bed/number pair into label and value.

Types

  • OutMode'double' | 'single'
  • CheckoutEntry{ darts: string[]; numDarts: number; alternates?: string[][] }
  • CheckoutChartRecord<number, CheckoutEntry>
  • ParsedTarget{ bed: BedType; number: number | null; value: number }
  • NotationMap{ treble: string; double: string; single: string; bull: string; outerBull: string }
  • OutsChartError — Custom error class with semantic codes

Development

npm install
npm run test        # Run tests
npm run typecheck   # Type-check
npm run build       # Build ESM + CJS + DTS
npm run build:demo  # Build demo IIFE bundle
npm run dev         # Build demo and serve locally
npm run verify      # Run all checks

License

ISC