-
Notifications
You must be signed in to change notification settings - Fork 59
Alex/update utils #133
Alex/update utils #133
Conversation
|
||
import * as ABIDecoder from 'abi-decoder'; | ||
import * as chai from 'chai'; | ||
import { SetProtocolUtils as utils } from 'set-protocol-utils'; |
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 it best practice to change a class with PascalCase to a variable with camelCase?
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.
I personally think it's more human readable
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.
I think so too. What I mean is should utils
be Utils
since it's a class
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.
The edge case is when you need to use static methods with the non-static methods.
I think a cleaner approach is to capitalize so we avoid something like this:
import { SetProtocolUtils as utils } from 'set-protocol-utils';
const utilities = new utils(web3);
and instead have something like this
import { SetProtocolUtils as Utils } from 'set-protocol-utils';
const utils = new Utils(web3);
Makes the instance delineated from the parent class.
Lmk if that makes sense.
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.
+1
7392895
to
4e6b9b3
Compare
No description provided.