-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
fs: improve argument handling for ReadStream #19898
Closed
+96
−38
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e507f93
fs: improve argument handling for ReadStream
ryzokuken 30c285f
test,fs: update tests for improvements in ReadStream
ryzokuken 915d77c
Remove inconsistency
ryzokuken 17d6d55
Separate testing for start and end
ryzokuken 36574f4
Remove invalid check
ryzokuken e4415d5
Address comments regarding handling undefined
ryzokuken b946616
Refactor conditions
ryzokuken d00b46a
fs,doc: add documentation regarding changes to createReadStream
ryzokuken 93b0915
Add a changes block and move new documentation towards the end
ryzokuken 5d03199
Replace version by REPLACEME
ryzokuken 047529b
Minimize comments and documentation
ryzokuken a90457b
Address nit by adding parens
ryzokuken c3be59a
Resolve merge conflict
ryzokuken 41b3a2e
Thow RangeError on fractional values
ryzokuken 3530baa
Cleanup fs.md
ryzokuken 4863dba
Fix error
ryzokuken 1cf1814
Fix failures
ryzokuken 2c35628
Address nit
ryzokuken a24f115
Use isSafeInteger over isInteger
ryzokuken 0368397
Change error message
ryzokuken b6fa515
Improve error handling
ryzokuken 7bda63c
Refactor fs tests for brevity
ryzokuken c34ba43
Address nits
ryzokuken 30e36c2
Update RangeError error message
ryzokuken 9af225c
Update RangeError error message v2
ryzokuken c76e75a
Fix lint errors
ryzokuken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix failures
commit 1cf1814d922818b38416d5803a5f41d937fae218
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You could save an unnecessary assignment if you move this condition to the else and make it
else if (this.end !== Infinity)
.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.
Will do, sure.