Module

std/text/mod.ts>toKebabCase

Deno standard library
Go to Latest
function toKebabCase
import { toKebabCase } from "https://dotland.deno.dev/std@0.219.1/text/mod.ts";

Converts a string into kebab-case.

Examples

Example 1

import { toKebabCase } from "https://deno.land/std@0.219.1/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