Closed jaketrent closed 11 years ago
It would be better to keep the second argument as:
String
for a seperator shortcutObject
containing options, like the following:slug("My String", { lowerCase: true, separator: '_', … });
Otherwise you end up with implicit arguments, making any further extension complicated.
@oncletom thats how it's implemented. but in the end i removed the lowerCase option since slug('str', {…}).toLowerCase()
is less code and same result.
:+1:
Added flag for forcing lowercase slugs.
Syntax:
And added tests to match. All passing.