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

Set a null prefix #30

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 3 comments
Open

Set a null prefix #30

GoogleCodeExporter opened this issue Mar 16, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I'd like to have no prefix set by the parsing at all. The issue comes in from: 
config.attributePrefix = config.attributePrefix || "_";
When passing in an empty string (attributePrefix: ""), this evaluates to false, 
and the underscore is set as the prefix. 

Original issue reported on code.google.com by [email protected] on 7 Oct 2014 at 8:29

@GoogleCodeExporter
Copy link
Author

Hello, I was trying the same, so I modify the line which initializes 
config.attributePrefix in initConfigDefaults() function. I've changed the 
original one with:

config.attributePrefix = (typeof config.attributePrefix !== "string") ? "_" : 
config.attributePrefix;

and now can use empty string as prefix. If you don't pass any value, it keep 
working as original version.

Regards

Original comment by [email protected] on 11 Nov 2014 at 9:50

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 12 Nov 2014 at 11:08

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Hello,

I was also trying to have an empty string as prefix. But I saw, that you use in 
other places the keyword "none" - this would also ok for me to have an empty 
prefix.

Thank You for your library!

Regards

Original comment by [email protected] on 7 Jan 2015 at 9:30

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

No branches or pull requests

1 participant