Every line of 'javascript proper case' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
8 function to_python_case(key) { 9 return key.replace(/([a-z])([A-Z]+)/g, function ($0, $1, $2) { 10 return $1 + '_' + $2.toLowerCase(); 11 }); 12 }
11 export function startCase(string) { 12 if (string) { 13 return string 14 .replace(/[_-]/g, ' ') 15 .toLowerCase() 16 .replace(/(?:^|\s|-)\S/g, x => x.toUpperCase()) 17 } 18 }