Socket
Book a DemoInstallSign in
Socket

lto

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lto

Install lto using your preferred package manager:

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

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")

Keywords

lto

FAQs

Package last updated on 03 Jan 2026

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