Skip to main content
Module

std/text/mod.ts>toKebabCase

The Deno Standard Library
Latest
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