var s1 = 'someTextHere';
var o1 = s1.split(/(?=[A-Z])/).join('_').toLowerCase();
const snakeToCamelCase = (s) =>
s.toLowerCase().replace(/(_w)/g, (w) => w.toUpperCase().substr(1));
const str1 = 'learn_javascript';
console.log(snakeToCamelCase(str1)); // learnJavaScript
type SnakeToCamelCase<S extends string> =
S extends `${infer T}_${infer U}` ?
`${T}${Capitalize<SnakeToCamelCase<U>>}` :
S