Skillfarm / website · skillfarm.ai / src / lib / brands.ts
| 1 | /** |
| 2 | * Card words stay plain: no outside company, product or person names in a skill's title, maker, summary or pick note. |
| 3 | * Write "a cloud company" or "an AI lab", not the name. Our own names (Skillfarm and the other Project ATOM names) are fine. |
| 4 | * Words that are also ordinary English ("Word", "Render", "Linear", "X") are matched only when capitalised mid-sentence, |
| 5 | * so they are left out of this list; reviewers catch those. |
| 6 | */ |
| 7 | const NAMES = [ |
| 8 | 'Anthropic', 'Claude', 'OpenAI', 'Codex', 'ChatGPT', 'GPT', 'Gemini', 'Google', 'Microsoft', 'Apple', 'macOS', 'iOS', 'iPhone', 'iPad', 'Android', |
| 9 | 'Cloudflare', 'Vercel', 'GitHub', 'GitLab', 'Stripe', 'Supabase', 'Figma', 'Slack', 'YouTube', 'Reddit', 'Twitter', 'LinkedIn', 'Upwork', 'Suno', |
| 10 | 'Bitwarden', 'ngrok', 'xAI', 'Grok', 'Sentry', 'Netlify', 'Runpod', 'Hugging Face', 'HashiCorp', 'Terraform', 'PlanetScale', 'DuckDB', 'Obsidian', |
| 11 | 'Expo', 'React', 'Playwright', 'Lighthouse', 'Remotion', 'HeyGen', 'Blender', 'n8n', 'Upstash', 'Chrome', 'Excel', 'PowerPoint', 'Jupyter', |
| 12 | 'Polymarket', 'Hacker News', 'Postgres', 'MySQL', 'SwiftUI', 'Xcode', 'Tailwind', 'ComfyUI', 'Docker', 'Discord', 'Meta', 'Amazon', 'AWS', 'Azure', |
| 13 | ]; |
| 14 | const RX = new RegExp(`\\b(${NAMES.map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|')})\\b`, 'i'); |
| 15 | |
| 16 | /** The first outside name found in any of the texts, or null when they are all plain. */ |
| 17 | export function brandIn(...texts: (string | null | undefined)[]): string | null { |
| 18 | for (const t of texts) { |
| 19 | const m = t ? RX.exec(t) : null; |
| 20 | if (m) return m[1]; |
| 21 | } |
| 22 | return null; |
| 23 | } |