-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the interface for Tipsify.tipsify and Tipsify.calculateACMR.
- Loading branch information
1 parent
6e6932a
commit 5eeb49e
Showing
4 changed files
with
81 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tipsify.tipsify
can still be cleaner, right? The caller either providesmaximumIndex
(and we use it) or they don't (and we compute it). Providing -1 shouldn't be valid. That was a C++ convention that we do not need or want. Just checktypeof args.maximumIndex === 'undefined'
.args
is not defined. You don't need to explicitly throw, but you can doargs = args || {}
and let it throw on the missing properties.args
is not common enough. I've been calling arguments like thistemplate
ordescription
, but as long as the name makes sense in the context of the function it is OK.