-
Notifications
You must be signed in to change notification settings - Fork 29
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
refactor: improve code for tuple checks #353
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## develop #353 +/- ##
===========================================
- Coverage 83.71% 83.40% -0.32%
===========================================
Files 18 19 +1
Lines 1130 1139 +9
Branches 255 259 +4
===========================================
+ Hits 946 950 +4
Misses 98 98
- Partials 86 91 +5
|
valueType
valueType
valueType
3de6505
to
9a8137a
Compare
9a8137a
to
dba141b
Compare
valueType
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.
nice
if (regexMatch) { | ||
bytesLengths.push(parseInt(regexMatch[1], 10)); | ||
} | ||
if (regexMatch) bytesLengths.push(parseInt(regexMatch[1], 10)); |
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.
personal preference - but i prefer with brackets, i think it is easier to read and see it is an if
|
||
let valueTypeToDecode = valueType; | ||
const extractTupleElements = (tupleContent: string): string[] => |
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.
nice
What kind of change does this PR introduce (bug fix, feature, docs update, ...)?
Refactor
What is the current behaviour (you can also link to an open issue here)?
Current code base work fine, but not easy to understand the code behind the tuple logic.
What is the new behaviour (if this is a feature change)?
Improve the code for tuple checking by create internal methods to valid and extract tuple content.
Other information: