-
-
Notifications
You must be signed in to change notification settings - Fork 206
Sheffield | May-2025 | Waleed- Salih-Taha | Sprint 2 | Data Group #672
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
Conversation
removed extra space.
…ty object with test one
cjyuan
left a comment
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 file
Sprint-2/implement/querystring.jswas not updated. -
These two files are still not properly reverted:
Sprint-3/quote-generator/index.htmlSprint-2/interpret/test.js
Note: You can view which files have been modified when compared to CYF's main on
https://github.com/CodeYourFuture/Module-Data-Groups/pull/672/files
All other changes look good.
Sprint-2/implement/querystring.js
Outdated
| queryParams[key] = value; | ||
| for (const pair of pairs) { | ||
| const [rawKey, rawValue] = pair.split("="); | ||
| const key = rawKey !== undefined ? decodeURIComponent(rawKey) : ""; |
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.
Could rawKey ever be undefined?
| const result = {}; | ||
| for (const [country, currency] of pairs) { | ||
| result[country] = currency; | ||
| if (!Array.isArray(pairs)) { |
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.
Indentation is a bit off.
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s |
1 similar comment
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s |
cjyuan
left a comment
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.
Changes look ok.
| const key = pair.slice(0, idx); | ||
| const value = pair.slice(idx + 1); | ||
|
|
||
| if (key === "equation" || key === "formula" || key === "expression" || value.includes('=')) { |
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.
Why don't you apply decodeURIComponent() to a value when it includes a "=" or when the key is one of those three values?
| queryParams[key] = value; | ||
| } else { | ||
| try { | ||
| queryParams[key] = decodeURIComponent(value.replace(/\+/g, ' ')); |
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.
key can also be URI-encoded in practice.
Learners, PR Template
Self checklist
Changelist
this PR gives a short set of requirements about a function. and You will need to implement, interpret and and sometimes fix a function based off this set of requirements
Questions
Ask any questions you have for your reviewer.