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

lto

v0.4.0

Published

Install lto using your preferred package manager:

Readme

Installation

Install lto using your preferred package manager:

# npm
npm install lto

# yarn
yarn add lto

# pnpm
pnpm install lto

Usage

Command Line

Generate lotto numbers directly from the command line:

npx lto
# Output: 1 4 11 14 25 43

JavaScript/TypeScript

Import and use lto in your JavaScript or TypeScript projects:

const { MAX_NUMBER, MIN_NUMBER, create, random } = require('lto');

// Constants
console.log(MAX_NUMBER, MIN_NUMBER); // 45 1

// Generate a single random number between 1 and 45
console.log(random(MIN_NUMBER, MAX_NUMBER)); // 8

// Generate 6 unique lotto numbers (sorted)
console.log(create()); // [ 2, 4, 10, 16, 19, 30 ]

Available exports:

  • MAX_NUMBER: Maximum lotto number (45)
  • MIN_NUMBER: Minimum lotto number (1)
  • create(): Returns an array of 6 unique, sorted numbers from 1 to 45
  • random(min: number, max: number): Returns a single random number between min and max (inclusive)

MCP Server (Model Context Protocol)

lto can be used as an MCP server, allowing AI assistants and other MCP-compatible tools to generate lotto numbers and check lotto results, as well as generate pension lottery numbers.

Setup

Add the following configuration to your MCP client settings file (e.g., ~/.cursor/mcp.json or .cursor/mcp.json):

{
  "mcpServers": {
    "lto": {
      "command": "npx",
      "args": ["-y", "lto", "mcp"]
    }
  }
}

Available Tools

generate_lotto_numbers

Generates 6 random, non-duplicate lotto numbers from 1 to 45.

  • Returns: A space-separated string of 6 sorted numbers
  • Example: "2 9 10 27 37 44"

check_lotto_numbers

Checks if your lotto numbers have won any prizes in the past year's draw results.

  • Parameters:
    • numbers (required): An array of 6 non-duplicate numbers from 1 to 45
  • Returns: Prize information if won, or a message indicating no wins
  • Prize tiers:
    • 1st place: 6 numbers match (probability: 1/8,145,060)
    • 2nd place: 5 numbers match + bonus number match (probability: 1/1,357,510)
    • 3st place: 5 numbers match (probability: 1/35,724)
    • 4th place: 4 numbers match (probability: 1/733)
    • 5th place: 3 numbers match (probability: 1/45)

generate_pension_lottery_numbers

Generates Pension Lottery 720+ numbers. Generates 6 random pension lottery numbers from 0 to 9.

  • Returns: A space-separated string of 6 digits (e.g., "1 2 3 4 5 6")