This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/string/camelCase.mjs
T

14 lines
346 B
JavaScript

import { capitalize } from './capitalize.mjs';
import { words } from './words.mjs';
function camelCase(str) {
const words$1 = words(str);
if (words$1.length === 0) {
return '';
}
const [first, ...rest] = words$1;
return `${first.toLowerCase()}${rest.map(word => capitalize(word)).join('')}`;
}
export { camelCase };