dodo / node-slug

slugifies even utf-8 chars!
MIT License
1.07k stars 94 forks source link

Option for Camel Casing #10

Closed binarykitchen closed 10 years ago

binarykitchen commented 11 years ago

Hi there

Do you think you could add a toCamelCase next to toLowerCase?

So that

slug('/video/create').toCamelCasel()

results into 'videoCreate'?

Thx!

pid commented 10 years ago

toLowerCase() has nothing to do with this module, it's a method of the string object... "Hello".toLowerCase(); // -> "hello"

more infos here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase

take a look at https://npmjs.org/package/to-camel-case

hope this helps ;-)

binarykitchen commented 10 years ago

Oh I see. Thx!