- Notifications
You must be signed in to change notification settings - Fork2.4k
refactor: js - intervals#449
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
}; | ||
const getBefore = (intervals, newInterval, index = 0, before = []) => { | ||
const hasGap = ([ prevStart, prevEnd ], [ currStart, currEnd ]) => |
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.
same as others
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.
@mitchellirvin
Since this in a while loop, we can either leave as is
consthasOverlap=()=> ...while(hasOverlap())
Move out of scoop
consthasOverlap=()=> ...constloop=()=>{while(hasOverlap())}
or add inline with comment
// hasOverlap = intervals[index] <= newInterval[1]while(intervals[index]<=newInterval[1])
Uh oh!
There was an error while loading.Please reload this page.
mitchellirvin left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
@aakhtar3 this looks much better than the existing code! thanks for all the hard work.
the nit suggestions are optional, let me know when you're ready (and the merge conflicts have been handled) and I'll merge this
1001524
to575b860
Comparethanks so much@aakhtar3 ! |
No description provided.