Nobledsmarts / spinal-tap-case

Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.

Home Page:https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spinal-tap-case

Convert a string to spinal case.
Spinal case is all-lowercase-words-joined-by-dashes.

Tests

spinalCase("This Is Spinal Tap") should return the string this-is-spinal-tap.

spinalCase("thisIsSpinalTap") should return the string this-is-spinal-tap.

spinalCase("The_Andy_Griffith_Show") should return the string the-andy-griffith-show.

spinalCase("Teletubbies say Eh-oh") should return the string teletubbies-say-eh-oh.

spinalCase("AllThe-small Things") should return the string all-the-small-things.