Skip to content

Commit

Permalink
fix: add few words to join words
Browse files Browse the repository at this point in the history
  • Loading branch information
nahoc committed Oct 21, 2024
1 parent 444ba49 commit 496f3f3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ https://www.npmjs.com/package/@risc0/ui

| Statements | Branches | Functions | Lines |
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
| ![Statements](https://img.shields.io/badge/statements-36.61%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-79.26%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-72%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-36.61%25-red.svg?style=flat) |
| ![Statements](https://img.shields.io/badge/statements-37.14%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-79.26%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-72%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-37.14%25-red.svg?style=flat) |
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risc0/ui",
"version": "0.0.193",
"version": "0.0.194",
"private": false,
"sideEffects": false,
"type": "module",
Expand Down Expand Up @@ -45,7 +45,7 @@
"sonner": "1.5.0",
"string-ts": "2.2.0",
"tailwind-merge": "2.5.4",
"tailwindcss": "3.4.13",
"tailwindcss": "3.4.14",
"tailwindcss-animate": "1.0.7",
"typescript": "5.7.0-dev.20240925",
"usehooks-ts": "3.1.0",
Expand Down
15 changes: 14 additions & 1 deletion utils/join-words.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import { join, toLowerCase } from "string-ts";

const DONT_FORMAT_THESE_WORDS = ["INSN", "OS", "CUDA", "ID", "RISC", "RTX", "NVIDIA", "CPU"];
const DONT_FORMAT_THESE_WORDS = [
"INSN",
"OS",
"CUDA",
"ID",
"RISC",
"RTX",
"NVIDIA",
"CPU",
"URL",
"ETH",
"BTC",
"AVAX",
];
const DONT_FORMAT_THESE_WORDS_LOWERCASE = DONT_FORMAT_THESE_WORDS.map(toLowerCase);

export function joinWords(str: string): string {
Expand Down

0 comments on commit 496f3f3

Please sign in to comment.