1
1
mirror of https://github.com/primer/css.git synced 2025-01-05 21:22:57 +03:00

split module words on "-", not " "

This commit is contained in:
Shawn Allen 2017-09-01 17:13:04 -07:00
parent 0676465938
commit a5b4a529e2

View File

@ -1,5 +1,5 @@
module.exports = str => {
return str.split(" ")
return str.split("-")
.map(word => word.charAt(0).toUpperCase() + word.substr(1).toLowerCase())
.join(" ")
}