Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

kebab case javascript

const kebabCase = string => string
        .replace(/([a-z])([A-Z])/g, "$1-$2")
        .replace(/[s_]+/g, '-')
        .toLowerCase();
  
    console.log(kebabCase('Geeks For Geeks'));
    console.log(kebabCase('GeeksForGeeks'));
    console.log(kebabCase('Geeks_For_Geeks'));
Comment

PREVIOUS NEXT
Code Example
Javascript :: loading 
Javascript :: span change jquery 
Javascript :: axios fetch 
Javascript :: setting up fontawesome with react project 
Javascript :: jquery change select value 
Javascript :: adb reverse USB debugging 
Javascript :: javascript onclick button 
Javascript :: angular get element by classname 
Javascript :: javascript throw error inside then 
Javascript :: jquery equivalent of document.getelementbyid 
Javascript :: postman response xml json xml2Json 
Javascript :: javascript two decimal places after division 
Javascript :: js bubble sort 
Javascript :: how to import dotenv in react 
Javascript :: sort array object 
Javascript :: jQuery onclick not firing on dynamically inserted HTML elements 
Javascript :: copy text on click 
Javascript :: react render component after fetch 
Javascript :: mongoose unique validator 
Javascript :: javascript object without undefined values 
Javascript :: js create array with default value 
Javascript :: date format using javascript 
Javascript :: How to add Strings as numbers in JavaScript 
Javascript :: Next js window is not defined solution 
Javascript :: json stringify double quotes 
Javascript :: puppeteer headless 
Javascript :: react native float upto 2 digits 
Javascript :: react navigation history clear 
Javascript :: react-active link 
Javascript :: filter repetition multidimensional array javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =