-
-
Notifications
You must be signed in to change notification settings - Fork 283
London | 26-ITP-January | Karla Grajales | Sprint 2 | Data Groups #1079
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
Open
Grajales-K
wants to merge
24
commits into
CodeYourFuture:main
Choose a base branch
from
Grajales-K:Sprint-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0ada3c7
fix: correct address property access in console log
Grajales-K 51fbc93
fix: iterate over author object values instead of object directly
Grajales-K 2af5e52
feat: add for of to print the ingredients logged on a new line
Grajales-K 431ad8d
test: enhance contains function tests for various scenarios
Grajales-K 12b176a
feat: implement contains function to check property existence in objects
Grajales-K a6db5d0
test: add tests for createLookup function to validate country and cur…
Grajales-K 45eff04
feat: implement createLooKup function to map countries to currencies
Grajales-K 8e727fa
fix: correct implementation of invert function to return expected key…
Grajales-K bbadd05
feat: simplify ingredient logging by joining array elements
Grajales-K 5954a24
fix: replace property check with Object.hasOwn for better accuracy
Grajales-K 32d596c
test: add test for inherited properties in contains function
Grajales-K 5fb163b
test: add additional tests for non-object parameters in contains func…
Grajales-K 7de3692
fix: enhance query string parsing to handle empty and malformed pairs
Grajales-K 9f2cfaa
fix: improve query string parsing to decode keys and values correctly
Grajales-K f576b00
test: add tests for query string parsing edge cases
Grajales-K c8745ab
test: update query string parsing test to cover additional value formats
Grajales-K f1acefa
test: add unit tests for tally function to validate item counting and…
Grajales-K 65beafc
feat: implement tally function to count items in an array with error …
Grajales-K 9ed9f13
refactor: split calculateMode into smaller functions for improved rea…
Grajales-K 0a6a351
fix: correct coin value calculation and format total output in totalT…
Grajales-K dace1b2
test: add unit tests for totalTill function to validate coin calculat…
Grajales-K e100de6
fix: update comments in invert function to clarify return values
Grajales-K 2a4bad9
fix: correct variable name for decoded key in query string parsing
Grajales-K cbe948e
fix: use Object.create(null) for counts in tally function to avoid pr…
Grajales-K 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
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,12 @@ | ||
| function contains() {} | ||
| function contains(obj, property) { | ||
| if (typeof obj !== "object" || obj === null || Array.isArray(obj)){ | ||
| return false; | ||
| } | ||
|
|
||
| return property in obj; | ||
|
Grajales-K marked this conversation as resolved.
Outdated
|
||
| } | ||
|
|
||
|
|
||
| module.exports = contains; | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| function createLookup() { | ||
| // implementation here | ||
| function createLookup(pairs) { | ||
| const result = {}; | ||
| for(const [country, currency] of pairs) { | ||
| result[country] = currency; | ||
| } | ||
| return result | ||
| } | ||
|
|
||
| module.exports = createLookup; |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.