Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!

String.toCamelCase

toCamelCase($upperCaseFirst = false)

Description

Convert to camelCase. A word is any substring that is separated by non-alphanumber characters (spaces, punctutation, etc).

'list-of-posts'.toCamelCase();
//= 'listOfPosts'

'list of posts'.toCamelCase();
//= 'listOfPosts'

'admin-user'.toCamelCase(true);
//= 'AdminUser'

See Also