Repository navigation
Manchester | 26-ITP-Sep | Rahana Suleiman | Sprint 2 | Sprint2-exercises (Module-Data-Groups) - #1509
rahanasuleiman8-ship-it wants to merge 18 commits into
Conversation
…g unnecessary lines
…eters and add support for decoding URI components
…d add error handling for non-array inputs
cjyuan
left a comment
There was a problem hiding this comment.
Code looks good. Well done.
I just have a few comments.
| } | ||
|
|
||
| // Check if the object has the specified property key | ||
| return Object.prototype.hasOwnProperty.call(obj, propertyName); |
There was a problem hiding this comment.
Note: Could also use Object.hasOwn().
| }); | ||
| }) | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Why not use a formatter to keep the code consistently formatted? They could help remove unnecessary trailing newlines and terminate statements with semicolon.
| function parseQueryString(queryString) { | ||
| const queryParams = {}; | ||
| if (queryString.length === 0) { | ||
| if (!queryString || queryString.length === 0) { |
There was a problem hiding this comment.
What does !queryString evalutes to when its length is 0?
|
Hi @cjyuan, thank you for the review and helpful feedback! I've pushed the updates to address all your comments:
Ready for another look whenever you have a moment! |
cjyuan
left a comment
There was a problem hiding this comment.
Changes to the code look good.
Note:
Some files still have trailing empty lines and some files do not have a trailing newline on the last line.
Prettier could usually take care of such inconsistency.
| }); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
For more context about last line not terminating with a newline character, please refer to Why GitHub PRs Show That Red Circle: Understanding Newlines at End of Files.
Self checklist
Task code
CYF-1083
Changelist
This PR completes Sprint 2 of Module-Data-Groups by implementing and testing core data and object manipulation functions—including property validation, query string parsing, lookup creation, frequency tallying, and object inversion—alongside comprehensive Jest unit tests.