Sheffield | May-2025 | Waleed- Salih-Taha | Sprint 2 | Data Group#672
Sheffield | May-2025 | Waleed- Salih-Taha | Sprint 2 | Data Group#672Bluejay600 wants to merge 58 commits intoCodeYourFuture:mainfrom
Conversation
removed extra space.
…ty object with test one
cjyuan
left a comment
There was a problem hiding this comment.
-
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.
Could rawKey ever be undefined?
| const result = {}; | ||
| for (const [country, currency] of pairs) { | ||
| result[country] = currency; | ||
| if (!Array.isArray(pairs)) { |
|
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 |
| 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.
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.
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.