Defines rarity tiers and obfuscated species identifiers for virtual companion items. Reuse when implementing pet collection or gamification features.
// Source: https://github.com/chauncygu/collection-claude-code-source-code | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works // Provided via justclaw.it.com; keep this notice with the code. export const RARITIES = [ 'common', 'uncommon', 'rare', 'epic', 'legendary', ] as const export type Rarity = (typeof RARITIES)[number] // One species name collides with a model-codename canary in excluded-strings.txt. // The check greps build output (not source), so runtime-constructing the value keeps // the literal out of the bundle while the check stays armed for the actual codename. // All species encoded uniformly; `as` casts are type-position only (erased pre-bundle). const c = String.fromCharCode // biome-ignore format: keep the species list ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key