UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

2 lines 374 B
import{t as e}from"./words-idA5_J31.js";const t=/[a-z]/u;function n(e,t){return typeof e==`string`?r(e,t):t=>r(t,e)}const r=(n,{preserveConsecutiveUppercase:r=!0}={})=>e(t.test(n)?n:n.toLowerCase()).map((e,t)=>`${t===0?e[0].toLowerCase():e[0].toUpperCase()}${r?e.slice(1):e.slice(1).toLowerCase()}`).join(``);export{n as toCamelCase}; //# sourceMappingURL=toCamelCase.js.map