UNPKG

codenames

Version:

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

24 lines 1.25 kB
/** * Auto-generated from snacks.txt. Do not edit manually. * Run 'bun run scripts/generate.ts snacks Snack' to regenerate. * * SPDX-FileCopyrightText: 2025-present Kriasoft * SPDX-License-Identifier: MIT */ export declare const snacks: readonly ["chips", "nuts", "cookie", "pretzel", "popcorn", "candy", "fruit", "cheese", "cracker", "yogurt", "apple", "banana", "jerky", "granola", "raisin", "peanut", "almond", "cashew", "walnut", "pecan", "grape", "orange", "mango", "berry", "cherry", "peach", "plum", "carrot", "celery", "hummus"]; export type Snack = (typeof snacks)[number]; /** * Converts a number to a Snack codename * * @param input - The number to convert * @returns A Snack name * * @example * ```typescript * import codename from "codenames/snacks-30"; * codename(1234) // "apple" * ``` */ export declare const codename: (input: number) => "orange" | "peach" | "cherry" | "grape" | "plum" | "apple" | "cheese" | "cookie" | "candy" | "chips" | "yogurt" | "fruit" | "carrot" | "berry" | "mango" | "almond" | "peanut" | "cashew" | "walnut" | "nuts" | "pretzel" | "popcorn" | "cracker" | "banana" | "jerky" | "granola" | "raisin" | "pecan" | "celery" | "hummus"; export default codename; //# sourceMappingURL=snacks-30.d.ts.map