UNPKG

codenames

Version:

Converts numerical values into human-readable names following a specific theme (e.g., cities)

29 lines 1.75 kB
/** * Auto-generated theme aggregator file. Do not edit manually. * Run 'bun run scripts/generate.ts all' to regenerate. * * SPDX-FileCopyrightText: 2025-present Kriasoft * SPDX-License-Identifier: MIT */ export type Theme = "adjectives-10" | "adjectives-20" | "adjectives-30" | "adjectives-50" | "adjectives-100" | "animals-10" | "animals-20" | "animals-30" | "animals-50" | "animals-100" | "cities-10" | "cities-20" | "cities-30" | "cities-50" | "cities-100" | "clothing-10" | "clothing-20" | "clothing-30" | "clothing-50" | "clothing-100" | "colors-10" | "colors-20" | "colors-30" | "colors-50" | "colors-100" | "countries-10" | "countries-20" | "countries-30" | "countries-50" | "countries-100" | "elements-10" | "elements-20" | "elements-30" | "elements-50" | "elements-100" | "emotions-10" | "emotions-20" | "emotions-30" | "emotions-50" | "emotions-100" | "food-10" | "food-20" | "food-30" | "food-50" | "food-100" | "gems-10" | "gems-20" | "gems-30" | "gems-50" | "gems-100" | "nature-10" | "nature-20" | "nature-30" | "nature-50" | "nature-100" | "snacks-10" | "snacks-20" | "snacks-30" | "snacks-50" | "snacks-100"; /** * Array of all available theme names for discoverability and validation. */ export declare const themes: readonly Theme[]; /** * Converts a number to a human-readable codename using the specified theme. * * @param input - The number to convert * @param theme - The theme name to use * @returns A string codename * * @example * ```typescript * import codename from "codenames/all"; * codename(123, "cities-20") // "tokyo" * codename(456, "animals-50") // "cat" * ``` */ export declare function codename(input: number, theme: Theme): string; export default codename; //# sourceMappingURL=all.d.ts.map