UNPKG

foalts2-cli

Version:

CLI tool for FoalTS

11 lines (10 loc) 483 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNames = void 0; function getNames(name) { const camelName = name.replace(/-([a-z])/gi, g => g[1].toUpperCase()); const kebabName = name.replace(/([a-z][A-Z])/g, g => `${g[0]}-${g[1].toLowerCase()}`); const upperFirstCamelName = camelName.charAt(0).toUpperCase() + camelName.slice(1); return { camelName, kebabName, upperFirstCamelName }; } exports.getNames = getNames;