@technobuddha/library
Version:
A large library of useful functions
19 lines (18 loc) • 661 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCamelCase = void 0;
var toSmallCase_1 = __importDefault(require("../toSmallCase"));
/**
* Convert an idenfifer string to a camel case
*
* @param input The identifier string
* @returns string in cemal case
*/
function toCamelCase(input) {
return toSmallCase_1.default(input.trim().replace(/[-_.\s]+\w/ug, function (c) { return c.slice(-1).toUpperCase(); }));
}
exports.toCamelCase = toCamelCase;
exports.default = toCamelCase;