millermedeiros / amd-utils

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

Allow for any delimeter with string/toSlug and add string/underscore #69

Closed conradz closed 12 years ago

conradz commented 12 years ago

This allows you to specify a delimeter for the string/toSlug function. I also added the convenience function string/underscore that is the same as string/hyphenate, but uses an underscore as the delimeter instead of a hyphen.

This change should be non-breaking, since the added parameter on string/toSlug defaults to a hyphen, which it used all the time before.

I also made string/hyphenate to have a code style closer to string/toSlug. This does not change any of the semantics of string/hyphenate, so not sure if I should have incremented the version or not (right now it has the version incremented, although I could change that).

millermedeiros commented 12 years ago

nice! BTW, I'm thinking about dropping the "to" on toSlug, see #66

I will merge it during the weekend (didn't had time to review it)