UNPKG

backend-smith

Version:

A CLI tool for automating backend component generation in Express.js, including modules, schemas, routes, services, and more.

6 lines 256 B
export const toKebabCase = (module: string )=>{ return module .replace(/([a-z])([A-Z])/g, '$1-$2') // Add hyphen between camelCase words .replace(/[\s_]+/g, '-') // Replace spaces and underscores with hyphens .toLowerCase(); }