Skip to content

Commit

Permalink
added a float.toString warning to CONTRIBUTING.md ccxt#1300 ccxt#1717
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Feb 27, 2018
1 parent 013db4a commit 114e751
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ And structurally:
- do not use conditional statements that are too complex (heavy if-bracketing)
- do not use heavy ternary conditionals
- avoid operators clutter (**don't do this**: `a && b || c ? d + 80 : e ** f`)
- never use `.toString()` on floats: `Number (0.00000001).toString () === '1e-8'`
- keep it simple, don't do more than one statement in one line

**If you want to add (support for) another exchange, or implement a new method for a particular exchange, then the best way to make it a consistent improvement is to learn from example. Take a look at how same things are implemented in other exchanges and try to copy the code flow and style.**
Expand Down

0 comments on commit 114e751

Please sign in to comment.