millermedeiros / amd-utils

modular JavaScript utilities written in the AMD format
http://millermedeiros.github.com/amd-utils
142 stars 11 forks source link

rename string/toSlug to string/slug? #66

Closed millermedeiros closed 12 years ago

millermedeiros commented 12 years ago

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.

conradz commented 12 years ago

Maybe rename to slugify, which seems to be a fairly common name for this.