MCPcopy
hub / github.com/QasimWani/LeetHub / toKebabCase

Function toKebabCase

scripts/gfg.js:14–20  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

12const UPDATE_MSG = 'Updated solution - LeetHub';
13let START_MONITOR = true;
14const 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
22function findGfgLanguage() {
23 const ele = document.getElementsByClassName('divider text')[0]

Callers 1

gfg.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected