Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

Naming conventions for not-exactly-private methods in addons

$
0
0

@nullnullnull wrote:

I've noticed that in the Ember code-base, many private functions and attributes are preceded by an underscore, eg. _myPrivateFuction(). I'm developing an addon that injects properties into common Ember objects, such as Components and Routes. These properties aren't technically private, as a service will be accessing them. But I want to discourage developers from using these properties themselves. Should I just use the underscore approach? Or is there a more conventional way to alert developers that this property is for internal use within the addon only?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4838

Trending Articles