(string)
| 12 | const UPDATE_MSG = 'Updated solution - LeetHub'; |
| 13 | let START_MONITOR = true; |
| 14 | const toKebabCase = (string) => { |
| 15 | return string |
| 16 | .replace(/[^a-zA-Z0-9\. ]/g, '') // remove special chars |
| 17 | .replace(/([a-z])([A-Z])/g, '$1-$2') // get all lowercase letters that are near to uppercase ones |
| 18 | .replace(/[\s_]+/g, '-') // replace all spaces and low dash |
| 19 | .toLowerCase(); // convert to lower case |
| 20 | }; |
| 21 | |
| 22 | function findGfgLanguage() { |
| 23 | const ele = document.getElementsByClassName('divider text')[0] |