UNPKG

wakeb-starter-cli

Version:

A powerful CLI tool for generating CRUD modules, common modules, and components with Vue 3 form schemas, featuring intelligent field detection and automatic schema generation

17 lines (13 loc) 445 B
export const toKebabCase = (str) => str .replace(/([a-z])([A-Z])/g, "$1-$2") .replace(/\s+/g, "-") .toLowerCase(); export const toCamelCase = (str) => str.replace(/-([a-z])/g, (g) => g[1].toUpperCase()); export const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1); export const toSnakeCase = (str) => str .replace(/-/g, "_") .replace(/([a-z])([A-Z])/g, "$1_$2") .toLowerCase();