- web/: Vue 3 + Vite + UnoCSS + Pinia, dark tactical theme (amber/#0d1117) - AppNav, ListingCard, SearchView with filters/sort, composables (useSnipeMode, useKonamiCode, useMotion), Pinia search store - Steal shimmer, auction countdown, Snipe Mode easter egg all native in Vue - docker/web/: nginx + multi-stage Dockerfile (node build → nginx serve) - compose.yml: api (8510) + web (8509) services - Dockerfile CMD updated to uvicorn for upcoming FastAPI layer - Clean build: 0 TS errors, 380 modules
27 lines
No EOL
645 B
JavaScript
27 lines
No EOL
645 B
JavaScript
/**
|
|
* Convert string to camelCase
|
|
*/
|
|
function camelize(str) {
|
|
return str.replace(/-([a-z0-9])/g, (g) => g[1].toUpperCase());
|
|
}
|
|
/**
|
|
* Convert string to PascaleCase
|
|
*/
|
|
function pascalize(str) {
|
|
const camel = camelize(str);
|
|
return camel.slice(0, 1).toUpperCase() + camel.slice(1);
|
|
}
|
|
/**
|
|
* Convert camelCase string to kebab-case
|
|
*/
|
|
function camelToKebab(key) {
|
|
return key.replace(/:/g, "-").replace(/([A-Z])/g, " $1").trim().split(/\s+/g).join("-").toLowerCase();
|
|
}
|
|
/**
|
|
* Convert camelCase string to snake-case
|
|
*/
|
|
function snakelize(str) {
|
|
return camelToKebab(str).replace(/-/g, "_");
|
|
}
|
|
|
|
export { camelToKebab, camelize, pascalize, snakelize }; |