JSFiddle - React, Tailwind, and code Playground
by Elvin Asadov
JavaScript
function camelCase(input) {
var txt = input;
txt = txt.toLowerCase().replace(/[^a-z ]+/g, ' ');
txt = txt.replace(/^(.)|\s(.)/g, function ($1) {
return $1.toUpperCase();
});
txt = txt.replace(/[^a-zA-Z]+/g, '');
return txt;
}
$(function () {
var result = '';
var slk = $('.daysIteratorSpan').text().split("|");
for (var i = 0; i < slk.length; i++) {
if (slk[i].trim() !== '') {
result += camelCase(slk[i].trim()) + '|';
}
}
alert(result);
$('#normiliserDynamic').remove();
});