UNPKG

backend-smith

Version:

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

11 lines (10 loc) 388 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toKebabCase = void 0; var toKebabCase = function (module) { 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(); }; exports.toKebabCase = toKebabCase;