(__Code Readability__): Function Aliases in Push Protocol implementation #6
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
Push protocol is a great tool but the thing is it has a lot of methods/functions with similar names
subscribe & unsubscribe look pretty similar when you skim over them and when you have a lot of stuff on your mind
I've come to the point where i have methods such as:
unsubscribeFromChannel and subscribeToChannel and you might argue that it is a bad naming convention and i do share some opinions on that. Visually they are hard to distinguish when working.
I would say that a temporary solution would be method aliasing in the main
./lib/PushService.js
with proper and quite visible documentation, such as alias of subscribeToChannel could be optIn, vice versa optOutThis could be a temporary solution until we refactor the class and break it down into smaller pieces that are user / channel / specific-field-oriented
The text was updated successfully, but these errors were encountered: