Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Feature: Camel case for properties/methods [59]

0
0
Hi,

I am exposing existing .NET objects to my script now following .NET conventions I am using PascalCase for my names, is there any nice way that these can become camel cased once exposed to js?

I don't want to have to pollute my objects with methods of both cases or move to camel casing, it would be nice if there was an attribute I could put on methods or some sort of global flag to say treat eveyrthing as camel case.

It would be nice if this could be conventional so I could support it on existing libraries that I cannot add the attribute to!


Ideas?


Thanks
Stefan
Comments: Is this something we could consider? looking at things I think it could easily be implemented as a global configuration and still allow overrides with the attribute, something like: engine.CamelCaseMemberNameSupport = true; I am happy to get together a PR for this if everyone thinks it will be a good idea? Thanks Stefan

Viewing all articles
Browse latest Browse all 2297