UNPKG

codenames

Version:

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

24 lines 1.54 kB
/** * 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", "ocean", "forest", "plant", "storm", "flower", "bird", "fish", "lake", "soil", "seed", "air", "stone", "beach", "wave", "light", "branch", "root", "stream", "valley", "pond", "dew", "bloom", "field", "shore", "cliff", "spring", "desert", "cave", "mud", "fog"]; 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-50"; * codename(1234) // "ocean" * ``` */ export declare const codename: (input: number) => "light" | "fish" | "bird" | "sky" | "forest" | "ocean" | "sand" | "snow" | "fog" | "water" | "ice" | "seed" | "stone" | "rock" | "tree" | "sun" | "rain" | "moon" | "star" | "wind" | "sea" | "leaf" | "fire" | "cloud" | "grass" | "earth" | "river" | "hill" | "plant" | "storm" | "flower" | "lake" | "soil" | "air" | "beach" | "wave" | "branch" | "root" | "stream" | "valley" | "pond" | "dew" | "bloom" | "field" | "shore" | "cliff" | "spring" | "desert" | "cave" | "mud"; export default codename; //# sourceMappingURL=nature-50.d.ts.map