camelcase to hyphenated javascript
let dashed = camel.replace(/[A-Z]/g, m => "-" + m.toLowerCase());
camelcase to hyphenated javascript
let dashed = camel.replace(/[A-Z]/g, m => "-" + m.toLowerCase());
js camel case to snake case
var s1 = 'someTextHere';
var o1 = s1.split(/(?=[A-Z])/).join('_').toLowerCase();
camel case in javascript
const sentence = 'The quick brown fox jumps over the lazy dog.';
console.log(sentence.toUpperCase());
// expected output: "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
javascript to camelcase
String.prototype.toCamelCase = function () {
let STR = this.toLowerCase()
.trim()
.split(/[ -_]/g)
.map(word => word.replace(word[0], word[0].toString().toUpperCase()))
.join('');
return STR.replace(STR[0], STR[0].toLowerCase());
};
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us