UNPKG

utilaide

Version:

Modern utility helper library for cleaner, faster TypeScript/JavaScript development 🚀🔧

8 lines (7 loc) • 360 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toTitleCase = exports.camelToSnake = void 0; const camelToSnake = (str) => str.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase(); exports.camelToSnake = camelToSnake; const toTitleCase = (str) => str.charAt(0).toUpperCase() + str.slice(1); exports.toTitleCase = toTitleCase;