all the other string methods doesn't have the to prefix (camelCase, lowerCase, hyphenate, ...) so I think it makes sense to remove it from toSlug as well.
The native string methods have the to prefix since they work on the string object itself (eg. str.toLowerCase()), on our case we pass the string as an argument.
all the other string methods doesn't have the
to
prefix (camelCase
,lowerCase
,hyphenate
, ...) so I think it makes sense to remove it fromtoSlug
as well.The native string methods have the
to
prefix since they work on the string object itself (eg.str.toLowerCase()
), on our case we pass the string as an argument.