Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/text/mod.ts>toKebabCase

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
function toKebabCase
import { toKebabCase } from "https://deno.land/std@0.224.0/text/mod.ts";

Converts a string into kebab-case.

Examples

Example 1

import { toKebabCase } from "https://deno.land/std@0.224.0/text/case.ts";

toKebabCase("deno is awesome"); // "deno-is-awesome"

Parameters

input: string

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

Returns

string

The string as kebab-case