API reference
words
Import
Section titled “Import”import * as api from "@fungi.computer/cairn/words";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| constant | ADJECTIVES | Modifiers — fungal + ranch descriptors (the first slot). |
| constant | NOUNS | Nouns — the mycological + ranch family (the rest of the slots). |
| function | words() | Generate a candidate word name such as luminescent-morel. |
Candidate word-name primitives for the Fungi family.
The generator uses:
- CSPRNG (
crypto.getRandomValues) — never Math.random. - Rejection sampling for the list index — no modulo bias, every word equally likely.
- Entropy sizing instead of a registry — uniqueness comes from bits, not a
lookup. Two lists of ~N words: adj-noun ≈ 2·log2(N) bits; add nouns to grow
it. There is no global registry and no check-and-retry — the caller sizes
countto the collision target (the birthday bound).
The vocabulary combines mycological and ranch terms.
ADJECTIVESconstant
Section titled “ADJECTIVES”const ADJECTIVES: readonly [ "gilled", "velvety", "spored", "saprotrophic", "mycorrhizal", "luminescent", "honeycomb", "truffley", "wispy", "earthy", "mossy", "woody", "waxy", "gelatinous", "coral", "inkcapped", "feathery", "stiped", "ringed", "annulate", "scaly", "shaggy", "fuzzy", "spiky", "conical", "umbral", "parasol", "leathery", "damp", "dewy", "bristly", "powdery", "yeasty", "musty", "ancient", "patient", "steady", "faithful", "hardy", "rootbound", "forested", "shaded", "sunlit", "sporeladen", "golden", "honeyed", "amber", "ivory", "crimson", "violet", "indigo", "silver", "mossgreen", "midnight", "creamy", "buttery", "porcelain", "glossy", "matte", "ribbed", "fluted", "wavy", "lobed", "branched", "curled", "folded", "hooded", "crowned", "blushing", "weeping", "laughing", "dancing", "singing", "whistling", "glowing", "ghostly", "fairy", "elfin", "rustic", "homey", "barnraised", "pasture", "orchard", "mill", "woven", "gardened", "herded", "trailed", "ridged", "meadow", "fielded", "vined", "rooted", "tendered", "seasoned", "ripe", "wild", "tame", "broody", "stubborn", "gentle", "drowsy", "watchful", "wandering", "migratory", "burrowed", "nested", "perched", "loamy", "mulched", "composted", "fermented", "brewed", "cured", "smoked", "pickled", "preserved", "aged", "vintage", "heirloom", "grandmothers", "forgotten", "remembered", "beloved", "cherished", "worn", "weathered", "windblown", "rainsoaked", "frosted", "snowed", "bloomed", "flowered", "seeded", "sprouted", "grafted", "pruned", "harvested", "threshed", "milled", "baked", "proofed", "risen", "folded", "twisted", "braided", "stitched", "patched", "mended", "polished", "burnished", "glazed", "gilded", "verdigris", "patinaed", "microdosed", "tripping", "wavy", "prismatic", "shimmering", "rippling", "echoing", "oracular", "mystic", "kaleidoscopic", "auroral", "nebular", "azure", "psychedelic", "transcendent", "visionary", "wandering", "dreaming", "phantom", "spectral", "iridescent", "liminal", "tidal", "celestial", "cosmic", "astral", "ethereal", "incandescent",];Modifiers — fungal + ranch descriptors (the first slot).
NOUNSconstant
Section titled “NOUNS”const NOUNS: readonly [ "shiitake", "morel", "chanterelle", "bolete", "puffball", "oyster", "enoki", "maitake", "lionsmane", "truffle", "porcini", "agaric", "amanita", "bracket", "conk", "stipe", "cap", "gill", "spore", "hypha", "mycelium", "sporocarp", "earthstar", "stinkhorn", "jelly", "milkcap", "blewit", "cep", "hedgehog", "woodear", "waxcap", "inkcap", "birdnest", "cup", "saddle", "fieldcap", "rust", "smut", "ergot", "lichen", "yeast", "mold", "toadstool", "fruitingbody", "basidiocarp", "ascocarp", "perithecium", "apothecium", "cystidium", "basidium", "clamp", "septa", "rhizomorph", "sclerotium", "gemma", "annulus", "volva", "pileus", "lamella", "trama", "gleba", "peridium", "sporangium", "zygospora", "conidia", "teleomorph", "anamorph", "saprobe", "endophyte", "epiphyte", "decomposer", "recycler", "alchemist", "mycorrhiza", "hyphae", "web", "net", "lattice", "thread", "strand", "root", "tendril", "runner", "vine", "ivy", "moss", "fern", "liverwort", "mule", "cairn", "almanac", "parrot", "birddog", "watchdog", "pigeon", "ranch", "barn", "coop", "pasture", "meadow", "field", "orchard", "gate", "fence", "silo", "well", "windmill", "homestead", "trail", "ridge", "creek", "hill", "grove", "vineyard", "apiary", "garden", "plot", "furrow", "shed", "stable", "trough", "hayloft", "rootcellar", "smokehouse", "springhouse", "millstone", "weathervane", "lantern", "tinderbox", "candlemold", "honeycomb", "beeswax", "propolis", "nectar", "pollen", "comb", "burrow", "den", "nest", "perch", "warren", "colony", "swarm", "flock", "herd", "pod", "grist", "flour", "starter", "mother", "scoby", "kombucha", "miso", "tempeh", "cheese", "rennet", "whey", "curd", "cream", "butter", "braid", "loaf", "crust", "crumb", "fiddlehead", "sorrel", "ramp", "morelberry", "huckleberry", "thimbleberry", "salmonberry", "serviceberry", "chokecherry", "microdose", "trip", "shroom", "liberty", "teacher", "treasure", "wanderer", "seeker", "dreamer", "shaman", "visionary", "tripper", "oracle", "seer", "augur", "prism", "fractal", "kaleidoscope", "spectrum", "nebula", "aurora", "comet", "meteor", "eclipse", "zenith", "horizon", "mirage", "echo", "ripple", "shimmer", "glimmer", "phantom", "twilight", "starlight", "moonbeam",];Nouns — the mycological + ranch family (the rest of the slots).
words()function
Section titled “words()”function words(options?): string;Generate a candidate word name such as luminescent-morel.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options? |
{ count?: number; separator?: string; } |
Candidate-name sizing and separator; bound untrusted values before calling. |
options.count? |
number |
Number of words (default 2 = adjective-noun). |
options.separator? |
string |
Separator (default “-”). |
Returns
Section titled “Returns”string
A candidate name assembled from the exported vocabularies.
Remarks
Section titled “Remarks”This legacy helper accepts trusted sizing-policy inputs; CPU and output scale
with the requested count. The count uses Math.max(1, Math.floor(count ?? 2)):
NaN, 0, 0.5, -1, and negative infinity produce one word, while 9
produces nine. Positive infinity throws a bounded RangeError. For new durable
identifiers, use defineIdFamily.
Throws
Section titled “Throws”If options.count is positive infinity.