helpers/handlebars-helpers

{{camelcase}} helper does not camelCase without space in the string

matthieu-sofa opened this issue · 1 comments

Note: Jon asked me to put this here after I reached out to him via mail. Because it seems to be a bug.

I'm reaching out to you to ask you a quick question about handlebars-helpers (awesome package by way, thanks a lot).

I want to transform a basic string "PascalCase" into camel case => "pascalCase"

I tried to use the {{camelcase}} helper (here https://www.npmjs.com/package/handlebars-helpers#camelcase)

but unfortunately it transforms a string into camel case string only if words in the string are separated by a space caracter :

Example

{{camelcase "foo bar baz"}};

Do you know what can be a workaround for this to get :

Example

{{camelcase "FooBarBaz"}};

Thanks a lot for your help.

Seems to be the same issue as this one : #259