@devlander/utils
Version:
Comprehensive JavaScript and TypeScript utilities for seamless development. Includes object manipulation, data validation, and more.
16 lines (15 loc) • 484 B
TypeScript
/**
* Converts a string to kebab-case (lowercase with hyphens).
*
* @param str - The string to convert to kebab-case.
* @returns The string in kebab-case format.
*
* @example
* ```typescript
* kebabCase("hello world"); // Returns: "hello-world"
* kebabCase("HelloWorld"); // Returns: "hello-world"
* kebabCase("hello_world"); // Returns: "hello-world"
* kebabCase("helloWorld"); // Returns: "hello-world"
* ```
*/
export declare const kebabCase: (str: string) => string;