-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feat/support bigint #135
Feat/support bigint #135
Conversation
a7d21b2
to
2540a47
Compare
a626eae
to
68313ef
Compare
3c52098
to
2072dea
Compare
Codecov Report
@@ Coverage Diff @@
## main #135 +/- ##
==========================================
+ Coverage 92.84% 93.17% +0.32%
==========================================
Files 17 17
Lines 657 674 +17
Branches 214 224 +10
==========================================
+ Hits 610 628 +18
+ Misses 47 46 -1
Continue to review full report at Codecov.
|
src/segment/urlType.js
Outdated
@@ -34,13 +35,33 @@ export const urlTypeToSegment = ({ baseUrl = '', source = '', range = '', indexR | |||
if (range || indexRange) { | |||
const rangeStr = range ? range : indexRange; | |||
const ranges = rangeStr.split('-'); | |||
const startRange = parseInt(ranges[0], 10); | |||
const endRange = parseInt(ranges[1], 10); | |||
let startRange = parseInt(ranges[0], 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.
Unless I'm missing something, it seems like parseInt
doesn't return a BigInt
. We probably need to parse as BigInt
and if it's under MAX_SAFE_INTEREGER
convert it to a regular number.
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.
fixed
Co-authored-by: Garrett Singer <[email protected]>
Support 64 bit integer values for sidx