-
Notifications
You must be signed in to change notification settings - Fork 400
Consolidate duplicated percentile(); remove unused percentRank(); return result directly without trivial local variable #1144
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
Conversation
…ial local variable
lib/autotune/index.js
Outdated
| @@ -1,3 +1,5 @@ | |||
| const percentile = require('../percentile') | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the first instance of const in this code? We've generally avoided it so far (in favor of var) because some people are still using old versions of node that barf on const.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to follow that policy, this pull request now imports percentile with var not const.
(I did find one other module using const though.
https://github.com/openaps/oref0/blob/master/lib/iob/calculate.js#L38 )
…urn result directly without trivial local variable (openaps#1144) * Use endsWith from Lodash * Return function results directly (without trivial local variable) * Eliminate another case of function returning trivial local variable * Another opportunity to directly return function result without a trivial local variable * Consolidate redundant functions "percentile"; remove unused function "percentRank" * Import percentile with var not const
No description provided.