codenames
Version:
Converts numerical values into human-readable names following a specific theme (e.g., cities)
24 lines • 1.73 kB
TypeScript
/**
* Auto-generated from elements.txt. Do not edit manually.
* Run 'bun run scripts/generate.ts elements Element' to regenerate.
*
* SPDX-FileCopyrightText: 2025-present Kriasoft
* SPDX-License-Identifier: MIT
*/
export declare const elements: readonly ["gold", "iron", "lead", "zinc", "tin", "copper", "silver", "carbon", "oxygen", "helium", "neon", "argon", "sodium", "sulfur", "silicon", "boron", "lithium", "calcium", "mercury", "arsenic", "uranium", "radium", "nickel", "cobalt", "chrome", "bromine", "iodine", "xenon", "krypton", "radon", "cesium", "barium", "gallium", "indium", "bismuth", "cadmium", "rhodium", "osmium", "hafnium", "rhenium", "iridium", "thorium", "cerium", "erbium", "terbium", "holmium", "thulium", "yttrium", "niobium", "tantalum"];
export type Element = (typeof elements)[number];
/**
* Converts a number to a Element codename
*
* @param input - The number to convert
* @returns An Element name
*
* @example
* ```typescript
* import codename from "codenames/elements-50";
* codename(1234) // "uranium"
* ```
*/
export declare const codename: (input: number) => "gold" | "silver" | "copper" | "cobalt" | "chrome" | "iron" | "lead" | "zinc" | "tin" | "carbon" | "oxygen" | "helium" | "neon" | "argon" | "sodium" | "sulfur" | "silicon" | "boron" | "lithium" | "calcium" | "mercury" | "arsenic" | "uranium" | "radium" | "nickel" | "bromine" | "iodine" | "xenon" | "krypton" | "radon" | "cesium" | "barium" | "gallium" | "indium" | "bismuth" | "cadmium" | "rhodium" | "osmium" | "hafnium" | "rhenium" | "iridium" | "thorium" | "cerium" | "erbium" | "terbium" | "holmium" | "thulium" | "yttrium" | "niobium" | "tantalum";
export default codename;
//# sourceMappingURL=elements-50.d.ts.map