codenames
Version:
Converts numerical values into human-readable names following a specific theme (e.g., cities)
24 lines • 989 B
TypeScript
/**
* Auto-generated from nature.txt. Do not edit manually.
* Run 'bun run scripts/generate.ts nature Nature' to regenerate.
*
* SPDX-FileCopyrightText: 2025-present Kriasoft
* SPDX-License-Identifier: MIT
*/
export declare const nature: readonly ["tree", "sun", "sky", "rain", "moon", "star", "wind", "sea", "water", "rock", "leaf", "fire", "cloud", "grass", "snow", "earth", "ice", "river", "hill", "sand"];
export type Nature = (typeof nature)[number];
/**
* Converts a number to a Nature codename
*
* @param input - The number to convert
* @returns A Nature name
*
* @example
* ```typescript
* import codename from "codenames/nature-20";
* codename(1234) // "leaf"
* ```
*/
export declare const codename: (input: number) => "sky" | "sand" | "snow" | "water" | "ice" | "rock" | "tree" | "sun" | "rain" | "moon" | "star" | "wind" | "sea" | "leaf" | "fire" | "cloud" | "grass" | "earth" | "river" | "hill";
export default codename;
//# sourceMappingURL=nature-20.d.ts.map