a a vibe-coded abomination experiment of a fragrance review platform built on the atmosphere.
drydown.social
1import type { House, AtUri } from '@/types/lexicon-types'
2
3/**
4 * Check if house name is unique (case-insensitive)
5 */
6export function isHouseNameUnique(
7 name: string,
8 existingHouses: House[],
9 excludeUri?: AtUri
10): boolean {
11 const normalized = name.trim().toLowerCase()
12 return !existingHouses.some(h =>
13 h.uri !== excludeUri &&
14 h.name.toLowerCase() === normalized
15 )
16}
17
18// NOTE: Fragrances do NOT need to be unique
19// The same house can have multiple fragrances with the same name but different years
20// Example: "Creed Aventus 2004" and "Creed Aventus 2024" are both valid