@rws-air/utils
Version:
Utilities for rws-air libraries and applications
14 lines • 463 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.snakeToCamelCase = void 0;
/**
* Transforms text from snake_case to camelCase.
* @param str Text to transform
*/
function snakeToCamelCase(str) {
return str
.toLowerCase()
.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));
}
exports.snakeToCamelCase = snakeToCamelCase;
//# sourceMappingURL=SnakeToCamelCase.js.map