toKebabCase

import { toKebabCase } from "jsr:@ende/text";

function

function toKebabCase(input: string): string

Converts a string into kebab-case.

input: string

The string that is going to be converted into kebab-case

Returns

The string as kebab-case

Example: Usage

import { toKebabCase } from "@ende/text/to-kebab-case";
import { assertEquals } from "@ende/assert";

assertEquals(toKebabCase("deno is awesome"), "deno-is-awesome");

Source