Skip to content

dash

Convert a string to dash case

334 bytes

Usage

Given a string returns it in dash case format.

import * as
import _
_
from 'radashi'
import _
_
.
function dash(str: string): string
export dash

Formats the given string in dash case fashion.

@seehttps://radashi.js.org/reference/string/dash

@example

dash('hello world') // => 'hello-world'
dash('one two_THREE') // => 'one-two-three'
dash('helloWord') // => 'hello-word'

@version12.1.0

dash
('green fish blue fish') // => green-fish-blue-fish