Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel Case not working on normal strings "User email" #7

Open
tbaustin opened this issue May 23, 2018 · 2 comments
Open

Camel Case not working on normal strings "User email" #7

tbaustin opened this issue May 23, 2018 · 2 comments

Comments

@tbaustin
Copy link

I think you stated this in the readme, maybe instead of lodash you could use the camelcase npm module https://www.npmjs.com/package/camelcase. I think it works on normal strings just fine and many others. It is actually what I use for my gatsby plugins to camelcase data before putting it into graphql.

const camelCase = require('camelcase');
type: camelCase(`googleSheet ${worksheetTitle} row`),

That should make strings like "User email" into userEmail.

@brandonmp
Copy link
Owner

Thanks, i'll take a look!

Lodash should work fine on simple space delineated strings (see repl example here).

I can't remember exactly, but I think part of the problem is how google sheets handles spaces in column names. e.g., it might just strip them out with no indication as to where the spaces were.

Whatever the root cause, though, it's definitely a problem, so I'll keep this open to track it

@tbaustin
Copy link
Author

Awesome let me know if there is anything I can do to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants