Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/String/Extra.elm
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,8 @@ The final string will be lowercased.
dasherize : String -> String
dasherize string =
string
|> String.trim
|> Regex.replace (regexFromString "([A-Z])") (.match >> String.append "-")
|> Regex.replace (regexFromString "[_-\\s]+") (always "-")
|> String.toLower
|> underscored
|> String.replace "_" "-"


{-| Separate a string into parts of a given width, using a given separator.
Expand Down