UNPKG

@builder.io/mitosis

Version:

Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io

18 lines (17 loc) 540 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.camelCase = void 0; const capitalize_1 = require("./capitalize"); /** * This is a function similar to loadash `camelCase`, but it does not mess with capitalization. * * loadash: `camelCase('A-BC')` => "ABc" * this fn: `camelCase('A-BC')` => "ABC" * */ function camelCase(text = '') { const parts = text.split('-'); const first = parts.shift(); return first + parts.map(capitalize_1.capitalize).join(''); } exports.camelCase = camelCase;